:
# @(#)lp 5.3b of Feb 25, 1988

# start and stop the lp scheduler
# also any transparent printer daemons that might be running
case "$1" {
start)
	if [ -x /usr/lib/lpsched ]
	then
#		if current run state is not 2 or 3, exit.  If current run state
#		IS 2 or 3, and the previous run state was also 2 or 3, exit
#		since this file was already executed in the previous state
		set `who -r`
		case "$7" {
			2|3)	case "$9" {
					2|3) exit ;;
				} ;;
			*) exit ;;
		}
		rm -f /usr/spool/lp/SCHEDLOCK
		/usr/lib/lpsched
		echo "Line printer scheduler started."
	fi ;;

stop)
	if [ -x /usr/lib/lpshut ]
	then
		/usr/lib/lpshut
	fi
	if [ -x /usr/lib/PCF/xpdkill ]
	then
		/usr/lib/PCF/xpdkill
	fi ;;
}
