#! /bin/sh # # chkconfig: - 55 45 # description: The arpwatch daemon attempts to keep track of ethernet/ip \ # address pairings. # processname: arpwatch WITHOUT_RC_COMPAT=1 # Source function library. . /etc/rc.d/init.d/functions # Get config. SourceIfNotEmpty /etc/sysconfig/network LOCKFILE=/var/lock/subsys/arpwatch RETVAL=0 start() { is_yes "$NETWORKING" || return 0 start_daemon --lockfile "$LOCKFILE" -- arpwatch RETVAL=$? return $RETVAL } stop() { stop_daemon --lockfile "$LOCKFILE" -- arpwatch RETVAL=$? return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status arpwatch RETVAL=$? ;; restart|reload) restart ;; condstop) if [ -f "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -f "$LOCKFILE" ]; then restart fi ;; *) msg_usage "${0##*/} {start|stop|status|restart|reload|condstop|condrestart}" RETVAL=1 esac exit $RETVAL