]>
Commit | Line | Data |
---|---|---|
852db316 JR |
1 | #! /bin/sh |
2 | # | |
0e28363d | 3 | # chkconfig: - 60 20 |
4 | # description: The bootparamd server allows older Sun workstations to \ | |
5 | # net boot from Linux boxes. It (along with rarp) is rarely \ | |
6 | # used anymore; bootp and dhcp have mostly replaced both of them. | |
7 | # processname: rpc.bootparamd | |
8 | # config: /etc/bootparams | |
852db316 JR |
9 | |
10 | # Source function library. | |
11 | . /etc/rc.d/init.d/functions | |
12 | ||
13 | # Get config. | |
14 | . /etc/sysconfig/network | |
15 | ||
16 | # Check that networking is up. | |
0e28363d | 17 | if is_no "${NETWORKING}"; then |
365c1f63 | 18 | msg_network_down rwalld |
0e28363d | 19 | exit 1 |
852db316 JR |
20 | fi |
21 | ||
22 | # See how we were called. | |
23 | case "$1" in | |
24 | start) | |
0e28363d | 25 | # Check if the service is already running? |
26 | if [ ! -f /var/lock/subsys/rpc.bootparamd ]; then | |
27 | msg_starting rpc.bootparamd | |
28 | daemon rpc.bootparamd | |
29 | touch /var/lock/subsys/rpc.bootparamd | |
459eaff6 JR |
30 | RETVAL=$? |
31 | if [ $RETVAL -eq 0 ]; then | |
0e28363d | 32 | touch /var/lock/subsys/rpc.bootparamd |
33 | RETVAL=1 | |
34 | fi | |
35 | else | |
365c1f63 | 36 | msg_already_running rpc.bootparamd |
0e28363d | 37 | exit 1 |
38 | fi | |
39 | ;; | |
852db316 | 40 | stop) |
0e28363d | 41 | if [ -f /var/lock/subsys/rpc.bootparamd ]; then |
42 | msg_stopping rpc.bootparamd | |
43 | killproc rpc.bootparamd | |
44 | rm -f /var/lock/subsys/rpc.bootparamd >/dev/null 2>&1 | |
45 | else | |
365c1f63 | 46 | msg_not_running rpc.bootparamd |
0e28363d | 47 | exit 1 |
48 | fi | |
49 | ;; | |
852db316 JR |
50 | status) |
51 | status rpc.bootparamd | |
52 | ;; | |
459eaff6 | 53 | reload|restart|force-reload) |
852db316 JR |
54 | $0 stop |
55 | $0 start | |
56 | ;; | |
57 | *) | |
365c1f63 | 58 | msg_usage "$0 {start|stop|restart|reload|force-reload|status}" |
852db316 | 59 | exit 1 |
0e28363d | 60 | ;; |
852db316 JR |
61 | esac |
62 | ||
0e28363d | 63 | exit $RETVAL |