]>
Commit | Line | Data |
---|---|---|
48d56092 PG |
1 | #!/bin/sh |
2 | # | |
3 | # arpd This shell script takes care of starting and stopping arpd | |
4 | # | |
5 | # chkconfig: 2345 11 89 | |
6 | # description: user-space arp daemon | |
7 | # processname: arpd | |
8 | # | |
9 | # pidfile: /var/run/arpd.pid | |
10 | ||
11 | # Source function library. | |
12 | . /etc/rc.d/init.d/functions | |
13 | ||
14 | # Source networking configuration. | |
15 | . /etc/sysconfig/network | |
16 | ||
17 | # Check that networking is up. | |
18 | if is_no "${NETWORKING}"; then | |
19 | msg_Network_Down arpd | |
20 | exit 1 | |
21 | fi | |
22 | ||
23 | # See how we were called. | |
24 | case "$1" in | |
25 | start) | |
26 | # Start daemons. | |
27 | if [ ! -f /var/lock/subsys/arpd ]; then | |
28 | msg_starting arpd | |
0eeafe9f | 29 | daemon arpd -u daemon |
48d56092 PG |
30 | RETVAL=$? |
31 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/arpd | |
32 | else | |
33 | msg_Already_Running arpd | |
34 | fi | |
35 | ;; | |
36 | stop) | |
37 | # Stop daemons. | |
38 | if [ -f /var/lock/subsys/arpd ]; then | |
39 | msg_stopping arpd | |
40 | killproc arpd | |
41 | rm -f /var/lock/subsys/arpd >/dev/null 2>&1 | |
42 | else | |
43 | msg_Not_Running arpd | |
44 | exit 1 | |
45 | fi | |
46 | ;; | |
47 | restart) | |
48 | $0 stop | |
49 | $0 start | |
50 | ;; | |
51 | status) | |
52 | status arpd | |
53 | ;; | |
54 | *) | |
55 | msg_Usage "$0 {start|stop|restart|status}" | |
56 | exit 1 | |
57 | esac |