From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5AC3F13835A for ; Sun, 28 Jun 2020 12:05:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86C3CE08F1; Sun, 28 Jun 2020 12:05:51 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 59C7CE08F1 for ; Sun, 28 Jun 2020 12:05:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 45AC234F00D for ; Sun, 28 Jun 2020 12:05:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BFE8F2BB for ; Sun, 28 Jun 2020 12:05:48 +0000 (UTC) From: "Jeroen Roovers" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" Message-ID: <1593345937.9207fdd5442a659ef9e18c75bad1eb277bb62ea5.jer@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/arpwatch/, net-analyzer/arpwatch/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/arpwatch/arpwatch-3.1.ebuild net-analyzer/arpwatch/files/arpwatch.confd-r2 net-analyzer/arpwatch/files/arpwatch.initd-r2 X-VCS-Directories: net-analyzer/arpwatch/files/ net-analyzer/arpwatch/ X-VCS-Committer: jer X-VCS-Committer-Name: Jeroen Roovers X-VCS-Revision: 9207fdd5442a659ef9e18c75bad1eb277bb62ea5 X-VCS-Branch: master Date: Sun, 28 Jun 2020 12:05:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: aad66e61-6e13-43ec-a16b-fd638e65c4dc X-Archives-Hash: eb201ef51ac11679acff1ba01d2e41b3 commit: 9207fdd5442a659ef9e18c75bad1eb277bb62ea5 Author: Jeroen Roovers gentoo org> AuthorDate: Sun Jun 28 12:04:44 2020 +0000 Commit: Jeroen Roovers gentoo org> CommitDate: Sun Jun 28 12:05:37 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9207fdd5 net-analyzer/arpwatch: Install new conf.d/init.d scripts Package-Manager: Portage-2.3.103, Repoman-2.3.23 Bug: https://bugs.gentoo.org/602552 Closes: https://bugs.gentoo.org/727220 Signed-off-by: Jeroen Roovers gentoo.org> net-analyzer/arpwatch/arpwatch-3.1.ebuild | 6 ++--- net-analyzer/arpwatch/files/arpwatch.confd-r2 | 18 +++++++++++++++ net-analyzer/arpwatch/files/arpwatch.initd-r2 | 33 +++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/net-analyzer/arpwatch/arpwatch-3.1.ebuild b/net-analyzer/arpwatch/arpwatch-3.1.ebuild index 92a1c502738..76be0e590a0 100644 --- a/net-analyzer/arpwatch/arpwatch-3.1.ebuild +++ b/net-analyzer/arpwatch/arpwatch-3.1.ebuild @@ -46,14 +46,14 @@ src_install() { newins "${WORKDIR}"/ethercodes.dat-${ETHERCODES_DATE} ethercodes.dat insinto /usr/share/arpwatch/awk - doins duplicates.awk euppertolower.awk p.awk e.awk d.awk + doins d.awk duplicates.awk e.awk euppertolower.awk p.awk diropts --group=arpwatch --mode=770 keepdir /var/lib/arpwatch dodoc README CHANGES - newinitd "${FILESDIR}"/arpwatch.initd-r1 arpwatch - newconfd "${FILESDIR}"/arpwatch.confd-r1 arpwatch + newconfd "${FILESDIR}"/arpwatch.confd-r2 arpwatch + newinitd "${FILESDIR}"/arpwatch.initd-r2 arpwatch } pkg_postinst() { diff --git a/net-analyzer/arpwatch/files/arpwatch.confd-r2 b/net-analyzer/arpwatch/files/arpwatch.confd-r2 new file mode 100644 index 00000000000..2937349cdc8 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.confd-r2 @@ -0,0 +1,18 @@ +# See arpwatch.8 for more information + +# Specify the interface for arpwatch to listen on here (default: lo). +# If you need to listen on more than one interface, you should +# run multiple arpwatch services; for example "arpwatch" and +# "arpwatch.eth1". These additional services can be configured by +# symlinking to the "arpwatch" service script, and by creating a new +# conf.d file whose name matches the new service (symlink) name. +# +# Example: +# +# ARPWATCH_IFACE="eth0" +# +ARPWATCH_IFACE="lo" + +# Additional options to pass to arpwatch. +# See arpwatch(8) +ARPWATCH_OPTS="-N -p" diff --git a/net-analyzer/arpwatch/files/arpwatch.initd-r2 b/net-analyzer/arpwatch/files/arpwatch.initd-r2 new file mode 100644 index 00000000000..93438209e1f --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.initd-r2 @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Default to "lo" for the interface, so that the init script will work +# out-of-the-box. +: ${ARPWATCH_IFACE:=lo} + +ARPWATCH_DATAFILE="/var/lib/arpwatch/${RC_SVCNAME}.dat" + +command="/usr/sbin/arpwatch" +pidfile="/run/${RC_SVCNAME}.pid" +command_args=" + -i ${ARPWATCH_IFACE} + -f ${ARPWATCH_DATAFILE} + -P ${pidfile} + ${ARPWATCH_OPTS} +" + +depend() { + if [ -f "/proc/net/vlan/${ARPWATCH_IFACE}" ]; then + _if=$(grep -i "device" /proc/net/vlan/${ARPWATCH_IFACE} |awk '{print $2;}') + else + _if=${ARPWATCH_IFACE} + fi + need "net.${_if}" +} + +start_pre() { + # The "arpwatch" user must be a member of the "arpwatch" group for + # this to work. + checkpath --file --owner root:arpwatch --mode 0660 "${ARPWATCH_DATAFILE}" +}