diff options
author | Markus Ullmann <jokey@gentoo.org> | 2007-02-01 21:09:13 +0000 |
---|---|---|
committer | Markus Ullmann <jokey@gentoo.org> | 2007-02-01 21:09:13 +0000 |
commit | d88b1e37d49987447bfd55a59cb26a697b022a0f (patch) | |
tree | 3cf701d7f2a917147d5eee2d8fdf826c7b5498b7 /net-analyzer/arpwatch/files/arpwatch.init | |
parent | cleanup, prospective stable version 5.2 (diff) | |
download | gentoo-2-d88b1e37d49987447bfd55a59cb26a697b022a0f.tar.gz gentoo-2-d88b1e37d49987447bfd55a59cb26a697b022a0f.tar.bz2 gentoo-2-d88b1e37d49987447bfd55a59cb26a697b022a0f.zip |
cleanup
(Portage version: 2.1.2-r1)
Diffstat (limited to 'net-analyzer/arpwatch/files/arpwatch.init')
-rw-r--r-- | net-analyzer/arpwatch/files/arpwatch.init | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/net-analyzer/arpwatch/files/arpwatch.init b/net-analyzer/arpwatch/files/arpwatch.init index bff9abeef761..f4c45bf90a9c 100644 --- a/net-analyzer/arpwatch/files/arpwatch.init +++ b/net-analyzer/arpwatch/files/arpwatch.init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/files/arpwatch.init,v 1.9 2006/09/08 10:44:00 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/files/arpwatch.init,v 1.10 2007/02/01 21:09:13 jokey Exp $ depend() { need net @@ -12,21 +12,25 @@ start() { do ebegin "Starting arpwatch on ${IFACE}" DATAFILE=/var/lib/arpwatch/${IFACE}.dat - if [ ! -f ${DATAFILE} ]; then - touch ${DATAFILE} - fi + [ ! -f ${DATAFILE} ] && touch ${DATAFILE} + if [ -z ${ARPUSER} ]; then - setsid /usr/sbin/arpwatch -i $IFACE -f /var/lib/arpwatch/$IFACE.dat ${OPTIONS} - eend $? + start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch -- -i ${IFACE} -f ${DATAFILE} ${OPTIONS} else - setsid /usr/sbin/arpwatch -i $IFACE -u ${ARPUSER} -f /var/lib/arpwatch/$IFACE.dat ${OPTIONS} - eend $? + start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch -- -i $IFACE -u ${ARPUSER} -f ${DATAFILE} ${OPTIONS} fi + eend $? done } stop() { - ebegin "Stopping arpwatch" - killall arpwatch > /dev/null - eend $? + for IFACE in ${IFACES} + do + ebegin "Stopping arpwatch on ${IFACE}" + start-stop-daemon --stop --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch + eend $? + done } |