1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
#!/bin/sh
#
# plptools Starts ncpd/plpfuse.
#
# chkconfig: 2345 45 10
# description: This facility enables connectivity to an EPOC PDA.
# Source function library.
. /etc/rc.d/init.d/functions
[ -f @prefix@/sbin/ncpd ] || exit 0
[ -f @prefix@/sbin/plpfuse ] || exit 0
[ -f @prefix@/sbin/plpprintd ] || exit 0
[ -f /etc/sysconfig/plptools ] || exit 0
. /etc/sysconfig/plptools
start() {
echo "Starting EPOC support ..."
RETVAL=0
if test "$START_NCPD" = "yes" ; then
echo -n " ncpd: "
daemon @prefix@/sbin/ncpd $NCPD_ARGS
RETVAL=$?
echo
fi
if [ $RETVAL -eq 0 ] ; then
if test "$START_PLPFUSE" = "yes" ; then
echo -n " plpfuse: "
daemon @prefix@/sbin/plpfuse $PLPFUSE_ARGS
RETVAL=$?
echo
fi
fi
if [ $RETVAL -eq 0 ] ; then
if test "$START_PLPPRINTD" = "yes" ; then
echo -n " plpprintd: "
daemon @prefix@/sbin/plpprintd $PLPPRINTD_ARGS
RETVAL=$?
echo
fi
fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/plptools
return $RETVAL
}
stop() {
echo "Stopping EPOC support ..."
RETVAL=0
if test "$START_PLPPRINTD" = "yes" ; then
echo -n " plpprintd: "
killproc plpprintd
echo
fi
if test "$START_PLPFUSE" = "yes" ; then
echo -n " plpfuse: "
fusermount -u /mnt/epoc
echo
fi
if test "$START_NCPD" = "yes" ; then
echo -n " 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 || :
;;
*)
echo "Usage: plptools {start|stop|status|restart|reload|condrestart}"
exit 1
esac
exit $?
|