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 is_yes "${NETWORKING}"; then
26 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
27 msg_network_down LPRng
35 [ -f /etc/printcap ] || exit 0
38 # See how we were called.
41 # Check if the service is already running?
42 if [ ! -f /var/lock/subsys/lpd ]; then
46 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lpd
48 msg_already_running "LPRng"
52 if [ -f /var/lock/subsys/lpd ]; then
55 rm -f /var/lock/subsys/lpd >/dev/null 2>&1
57 msg_not_running "LPRng"
70 msg_usage "$0 {start|stop|restart|force-reload|status}"