3 # lpd This shell script takes care of starting and stopping
4 # lpd (printer daemon).
6 # chkconfig: 2345 60 60
8 # description: 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_no "${NETWORKING}"; then
31 [ -f /etc/printcap ] || exit 1
33 # See how we were called.
36 # Check if the service is already running?
37 if [ ! -f /var/lock/subsys/lpd ]; then
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lpd
43 msg_Already_Running Lpd
49 if [ -f /var/lock/subsys/lpd ]; then
52 rm -f /var/lock/subsys/lpd >/dev/null 2>&1
67 msg_Usage "$0 {start|stop|status|restart}"