]> git.pld-linux.org Git - packages/bootparamd.git/blame - bootparamd.init
- quote cc
[packages/bootparamd.git] / bootparamd.init
CommitLineData
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 17if is_yes "${NETWORKING}"; then
2abe21dc 18 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
d695958f 19 msg_network_down rwalld
20 exit 1
21 fi
22else
23 exit 0
852db316
JR
24fi
25
6229899e 26RETVAL=0
852db316
JR
27# See how we were called.
28case "$1" in
29 start)
0e28363d 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
459eaff6 35 RETVAL=$?
6229899e 36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rpc.bootparamd
0e28363d 37 else
365c1f63 38 msg_already_running rpc.bootparamd
0e28363d 39 fi
d695958f 40 ;;
852db316 41 stop)
0e28363d 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
365c1f63 47 msg_not_running rpc.bootparamd
06bc1346 48 fi
d695958f 49 ;;
852db316
JR
50 status)
51 status rpc.bootparamd
6229899e 52 exit $?
852db316 53 ;;
6229899e 54 restart|force-reload)
852db316
JR
55 $0 stop
56 $0 start
6229899e 57 exit $?
852db316
JR
58 ;;
59 *)
6229899e 60 msg_usage "$0 {start|stop|restart|force-reload|status}"
61 exit 3
0e28363d 62 ;;
852db316
JR
63esac
64
0e28363d 65exit $RETVAL
This page took 0.062587 seconds and 4 git commands to generate.