3 # LPRng This shell script takes care of starting and stopping
4 # LPRng lpd (printer daemon).
6 # chkconfig: 2345 60 60
8 # description: LPRng lpd is the print daemon required for lpr to work properly. \
9 # It is basically a server that arbitrates print jobs to printer(s).
12 # config: /etc/printcap
15 # Source function library
16 . /etc/rc.d/init.d/functions
19 . /etc/sysconfig/network
22 [ -f /etc/sysconfig/lpd ] && . /etc/sysconfig/lpd
24 # Check that networking is up.
25 if [ "${NETWORKING}" = "no" ]; then
26 echo "WARNING: Networking is down. LPRng lpd can't be runed."
31 [ -f /etc/printcap ] || exit 0
34 # See how we were called.
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/lpd ]; then
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lpd
44 msg_Already_Running "LPRng"
49 if [ -f /var/lock/subsys/lpd ]; then
52 rm -f /var/lock/subsys/lpd >/dev/null 2>&1
54 msg_Not_Running "LPRng"
67 msg_Usage "$0 {start|stop|status|restart|reload}"