#!/bin/sh # # plptools Starts ncpd/plpfuse. # # chkconfig: 2345 45 10 # description: This facility enables connectivity to an EPOC PDA. ### BEGIN INIT INFO # Provides: plptools # Required-Start: $local_fs $network $syslog # Required-Stop: $local_fs $network $syslog # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Enables connectivity to a Psion series 5. # Description: This facility enables connectivity to a Psion series 5. ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions [ -f /usr/sbin/ncpd ] || exit 0 [ -f /usr/sbin/plpfuse ] || exit 0 [ -f /usr/sbin/plpprintd ] || exit 0 [ -f /etc/sysconfig/plptools ] || exit 0 . /etc/sysconfig/plptools start() { gprintf "Starting EPOC support ...\n" RETVAL=0 if test "$START_NCPD" = "yes" ; then gprintf " ncpd: " daemon /usr/sbin/ncpd $NCPD_ARGS RETVAL=$? echo fi if [ $RETVAL -eq 0 ] ; then if test "$START_PLPFUSE" = "yes" ; then gprintf " plpfuse: " daemon /usr/sbin/plpfuse $PLPFUSE_ARGS RETVAL=$? echo fi fi if [ $RETVAL -eq 0 ] ; then if test "$START_PLPPRINTD" = "yes" ; then gprintf " plpprintd: " daemon /usr/sbin/plpprintd $PLPPRINTD_ARGS RETVAL=$? echo fi fi [ $RETVAL -eq 0 ] && touch /var/lock/subsys/plptools return $RETVAL } stop() { gprintf "Stopping EPOC support ...\n" RETVAL=0 if test "$START_PLPPRINTD" = "yes" ; then gprintf " plpprintd: " killproc plpprintd echo fi if test "$START_PLPFUSE" = "yes" ; then gprintf " plpfuse: " fusermount -u /mnt/epoc echo fi if test "$START_NCPD" = "yes" ; then gprintf " ncpd: " killproc ncpd RETVAL=$? echo fi [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/plptools return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status ncpd status plpprintd ;; restart|reload) restart ;; condrestart) test -f /var/lock/subsys/plptools && restart || : ;; *) gprintf "Usage: plptools {start|stop|status|restart|reload|condrestart}\n" exit 1 esac exit $?