2e52872be6924b5e79b30702b86c743390d48972
[packages/bootparamd.git] / bootparamd.init
1 #! /bin/sh
2 #
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
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.
17 if is_yes "${NETWORKING}"; then
18         if [ ! -f /var/lock/subsys/network -a != stop -a != status ]; then
19                 msg_network_down rwalld
20                 exit 1
21         fi
22 else
23         exit 0
24 fi
25
26 RETVAL=0
27 # See how we were called.
28 case "$1" in
29   start)
30         # Check if the service is already running?
31         if [ ! -f /var/lock/subsys/rpc.bootparamd ]; then
32                 msg_starting rpc.bootparamd
33                 daemon rpc.bootparamd
34                 touch /var/lock/subsys/rpc.bootparamd
35                 RETVAL=$?
36                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rpc.bootparamd
37         else
38                 msg_already_running rpc.bootparamd
39         fi
40         ;;
41   stop)
42         if [ -f /var/lock/subsys/rpc.bootparamd ]; then
43                 msg_stopping rpc.bootparamd
44                 killproc rpc.bootparamd
45                 rm -f /var/lock/subsys/rpc.bootparamd >/dev/null 2>&1
46         else
47                 msg_not_running rpc.bootparamd
48         fi      
49         ;;
50   status)
51         status rpc.bootparamd
52         exit $?
53         ;;
54   restart|force-reload)
55         $0 stop
56         $0 start
57         exit $?
58         ;;
59   *)
60         msg_usage "$0 {start|stop|restart|force-reload|status}"
61         exit 3
62         ;;
63 esac
64
65 exit $RETVAL
This page took 0.067951 seconds and 2 git commands to generate.