#!/bin/sh
#
# lpd           This shell script takes care of starting and stopping
#               lpd (printer daemon).
#

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/lpd ] || exit 0

[ -f /etc/printcap ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting lpd: "
        daemon lpd
        echo
        touch /var/lock/subsys/lpd
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down lpd: "
	killproc lpd
        echo
        rm -f /var/lock/subsys/lpd
        ;;
  *)
        echo "Usage: lpd {start|stop}"
        exit 1
esac

exit 0
