]>
Commit | Line | Data |
---|---|---|
7b0d0d3a AF |
1 | #! /bin/sh |
2 | # | |
3 | # chkconfig: - 55 45 | |
4 | # description: The arpwatch daemon attempts to keep track of ethernet/ip \ | |
5 | # address pairings. | |
6 | # processname: arpwatch | |
7 | ||
8 | # Source function library. | |
9 | . /etc/rc.d/init.d/functions | |
10 | ||
11 | # Get config. | |
12 | . /etc/sysconfig/network | |
13 | ||
14 | # Check that networking is up. | |
15 | if [ ${NETWORKING} = "no" ] | |
16 | then | |
17 | exit 0 | |
18 | fi | |
19 | ||
20 | # See how we were called. | |
21 | case "$1" in | |
22 | start) | |
23 | show Starting arpwatch: | |
24 | daemon arpwatch | |
25 | touch /var/lock/subsys/arpwatch | |
26 | ;; | |
27 | stop) | |
28 | show Stopping arpwatch: | |
29 | killproc arpwatch | |
30 | rm -f /var/lock/subsys/arpwatch | |
31 | ;; | |
32 | status) | |
33 | status arpwatch | |
34 | ;; | |
35 | restart|reload) | |
36 | $0 stop | |
37 | $0 start | |
38 | ;; | |
39 | *) | |
40 | echo "Usage: arpwatch {start|stop|status|restart|reload}" | |
41 | exit 1 | |
42 | esac | |
43 | ||
44 | exit 0 |