]>
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. | |
d695958f | 17 | if is_yes "${NETWORKING}"; then |
2abe21dc | 18 | if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then |
efa16f37 | 19 | msg_network_down rpc.bootparamd |
d695958f | 20 | exit 1 |
21 | fi | |
22 | else | |
23 | exit 0 | |
852db316 JR |
24 | fi |
25 | ||
0253101e JR |
26 | if [ "$1" != "stop" ]; then |
27 | check_portmapper || { nls "Error: portmap isn't running" && exit 0; } | |
28 | fi | |
29 | ||
6229899e | 30 | RETVAL=0 |
852db316 JR |
31 | # See how we were called. |
32 | case "$1" in | |
33 | start) | |
0e28363d | 34 | # Check if the service is already running? |
35 | if [ ! -f /var/lock/subsys/rpc.bootparamd ]; then | |
36 | msg_starting rpc.bootparamd | |
37 | daemon rpc.bootparamd | |
38 | touch /var/lock/subsys/rpc.bootparamd | |
459eaff6 | 39 | RETVAL=$? |
6229899e | 40 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rpc.bootparamd |
0e28363d | 41 | else |
365c1f63 | 42 | msg_already_running rpc.bootparamd |
0e28363d | 43 | fi |
d695958f | 44 | ;; |
852db316 | 45 | stop) |
0e28363d | 46 | if [ -f /var/lock/subsys/rpc.bootparamd ]; then |
47 | msg_stopping rpc.bootparamd | |
48 | killproc rpc.bootparamd | |
49 | rm -f /var/lock/subsys/rpc.bootparamd >/dev/null 2>&1 | |
50 | else | |
365c1f63 | 51 | msg_not_running rpc.bootparamd |
06bc1346 | 52 | fi |
d695958f | 53 | ;; |
852db316 JR |
54 | status) |
55 | status rpc.bootparamd | |
6229899e | 56 | exit $? |
852db316 | 57 | ;; |
6229899e | 58 | restart|force-reload) |
852db316 JR |
59 | $0 stop |
60 | $0 start | |
6229899e | 61 | exit $? |
852db316 JR |
62 | ;; |
63 | *) | |
6229899e | 64 | msg_usage "$0 {start|stop|restart|force-reload|status}" |
65 | exit 3 | |
0e28363d | 66 | ;; |
852db316 JR |
67 | esac |
68 | ||
0e28363d | 69 | exit $RETVAL |