Listing 4: S80lpd, BSD spooler start/stop
# Example 4 (S80lpd), John Lees
#
# BSD spooler start/stop. This goes in /etc/rc2.d
# for system boot up and shut down. Scripts in
# that directory are executed upon entering (S*) or
# leaving (K*) run level 2. They are executed in
# collating order. (So DO NOT rename something to
# *.old or it will still be executed!)
case $1 in
'start') # Start the spooler during system boot.
if test -f /opt/lib/lpd/lpd
then
/bin/rm -f /var/spool/lpd.lock
/bin/rm -f /dev/lpd/printer
/opt/lib/lpd/lpd
fi
;;
'stop') # Any spooler shutdown and cleanup you
# want to do during an orderly system shutdown.
if test -f /opt/lib/lpd/lpdstop
then
/opt/lib/lpd/lpdstop
fi
;;
esac
#----- end of S80lpd -----
|