Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > media > updates > by-pkgid > 9f76d24be37ca2d6b601b0e9b5bc1cc7 > files > 4

printer-filters-1.0-138.2.100mdk.i586.rpm

#!/bin/bash

# Init file for the oki4daemon printer driver daemon
#
# chkconfig: 2345 59 59
# description: A special daemon developed by Grant Taylor to \
#              support the OKI 4w and compatible winprinters. \
#              These printers have high requirements concerning \
#              timing and therefore one cannot use their driver \
#              directly out of a printer spooler (CUPS, LPD). To \
#              solve this problem, one lets the spooler send the \
#              job to this deamon. Activate this daemon when you \
#              have one of these printers and set up a CUPS queue \
#              for your printer with "oki4w_install". Do not \
#              connect an OKI winprinter to a machine with high \
#              loads or high security demands.
#
# processname: oki4daemon

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

RETVAL=0

case "$1" in
  start)
        gprintf "Starting oki4daemon printer driver daemon: "
        daemon oki4daemon
        RETVAL=$?

        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/oki4daemon
        ;;
  stop)
        gprintf "Stopping oki4daemon printer driver daemon: "
        killproc oki4daemon
        RETVAL=$?

        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/oki4daemon
        ;;
  restart)
        $0 stop
        $0 start
	RETVAL=$?
        ;;
  status)
        status oki4daemon
	RETVAL=$?
        ;;
  condrestart)
        if [ -f /var/lock/subsys/oki4daemon ]; then
	    $0 stop
	    $0 start
	    RETVAL=$?
	fi
	;;
  reload)
        $0 restart
	RETVAL=$?
        ;;
  *)
	gprintf "Usage: oki4daemon {start|stop|restart|status|condrestart}\n"
	exit 1
esac

exit $RETVAL