#!/bin/sh # # rpld: Start and stop the RPL/RIPL remote boot server # # chkconfig: - 80 20 # # description: rpld allows netboot of IBM style RPL boot ROMs. # pidfile: /var/run/rpld.pid # config: /etc/rpld.conf # Source function library . /etc/rc.d/init.d/functions # Get network config . /etc/sysconfig/network RPLDOPTS= # Get service config [ -f /etc/sysconfig/rpld ] && . /etc/sysconfig/rpld # Check that networking is up. [ "${NETWORKING}" = "no" ] && exit 1 RETVAL=0 prog="rpld" pidfile="/var/run/rpld.pid" lockfile="/var/lock/subsys/rpld" start() { echo -n $"Starting $prog: " daemon --pidfile $pidfile $prog $RPLDOPTS RETVAL=$? echo if [ $RETVAL -eq 0 ]; then touch $lockfile pidof $prog > $pidfile fi return $RETVAL } stop() { echo -n $"Shutting down $prog: " killproc $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $lockfile return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload) $0 stop $0 start ;; status) status $prog RETVAL=$? ;; *) echo "Usage: $0 {start|stop|status|restart|reload}" exit 1 esac exit $RETVAL