aboutsummaryrefslogtreecommitdiffstats
path: root/etc/plptools.in
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2008-02-16 17:14:33 +0000
committerReuben Thomas <rrt@sc3d.org>2008-02-16 17:14:33 +0000
commitd4c889ede16205304ba7b819b0b894af27237075 (patch)
treef32e24b490e7ae262bb65f039e40f1034fe4a040 /etc/plptools.in
parent3c3a85c2202ae6531963736bde24937ab99a4bb8 (diff)
downloadplptools-d4c889ede16205304ba7b819b0b894af27237075.tar.gz
plptools-d4c889ede16205304ba7b819b0b894af27237075.tar.bz2
plptools-d4c889ede16205304ba7b819b0b894af27237075.zip
Bump version to 0.21.
Remove SuSE init script and plptools.spec, as they're way out of date. Keep generic init script so we have *something* to show; rename it to "plptools". Remove unused PSIONHOSTNAME define from config.h. Change some occurrences of "Psion" to "EPOC" in configure.ac.
Diffstat (limited to 'etc/plptools.in')
-rwxr-xr-xetc/plptools.in98
1 files changed, 98 insertions, 0 deletions
diff --git a/etc/plptools.in b/etc/plptools.in
new file mode 100755
index 0000000..d19378c
--- /dev/null
+++ b/etc/plptools.in
@@ -0,0 +1,98 @@
+#!/bin/sh
+#
+# psion Starts ncpd/plpfuse.
+#
+# chkconfig: 2345 45 10
+# description: This facility enables connectivity to a Psion series 5.
+
+# 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/psion ] || exit 0
+. /etc/sysconfig/psion
+
+start() {
+ echo "Starting Psion 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/psion
+ return $RETVAL
+}
+
+stop() {
+ echo "Stopping Psion 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/psion
+ echo
+ fi
+ if test "$START_NCPD" = "yes" ; then
+ echo -n " ncpd: "
+ killproc ncpd
+ RETVAL=$?
+ echo
+ fi
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/psion
+ 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/psion && restart || :
+ ;;
+ *)
+ echo "Usage: psion {start|stop|status|restart|reload|condrestart}"
+ exit 1
+esac
+
+exit $?
+