Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > c40e47ccb925ef1bc0557d8e8f8e001d > files > 2

oki4linux-2.1gst-17.mga6.src.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
#
### BEGIN INIT INFO
# Provides: oki4daemon
# Default-Start: 2 3 4 5
# Short-Description: daemon to support OKI 4w printers
# Description: A special daemon to support specific OKI 4w and compatible printers
### END INIT INFO

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

RETVAL=0

case "$1" in
  start)
        echo -n "Starting oki4daemon printer driver daemon: "
        daemon oki4daemon
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/oki4daemon
        echo
        ;;
  stop)
        echo -n "Stopping oki4daemon printer driver daemon: "
        killproc oki4daemon
        RETVAL=$?
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/oki4daemon
        echo
        ;;
  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=$?
        ;;
  *)
	echo "Usage: oki4daemon {start|stop|restart|status|condrestart}"
	exit 1
esac

exit $RETVAL