#!/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-2,v 1.1 2006/09/23 19:10:29 pva Exp $ depend() { need net } start() { for IFACE in ${IFACES} do ebegin "Starting arpwatch on ${IFACE}" DATAFILE=/var/lib/arpwatch/${IFACE}.dat [ ! -f ${DATAFILE} ] && touch ${DATAFILE} if [ -z ${ARPUSER} ]; then start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ /usr/sbin/arpwatch -- -i ${IFACE} -f ${DATAFILE} ${OPTIONS} else 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() { 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 }