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