From bb20db8e8760000402af72583770a4683ef79693 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Wed, 10 Jul 2002 23:15:43 +0000 Subject: - SuSE 8 - related changes - RPM - related changes - sisinstall: Correct shutdown of newt if an error occurs. --- etc/psion.SuSE8.in | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100755 etc/psion.SuSE8.in (limited to 'etc/psion.SuSE8.in') diff --git a/etc/psion.SuSE8.in b/etc/psion.SuSE8.in new file mode 100755 index 0000000..e3f620e --- /dev/null +++ b/etc/psion.SuSE8.in @@ -0,0 +1,105 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: psion +# Required-Start: $syslog +# Required-Stop: +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Description: Start Psion support +### END INIT INFO + +# Source function library. +. /etc/rc.status + +[ -f @prefix@/sbin/ncpd ] || exit 0 +[ -f @prefix@/sbin/plpnfsd ] || exit 0 +[ -f @prefix@/sbin/plpprintd ] || exit 0 +[ -f /etc/sysconfig/psion ] || exit 0 +. /etc/sysconfig/psion + +MGETTY_HASPLP=false + +if grep -qs ^/PLP/ /etc/mgetty+sendfax/login.config ; then + mrun=`pidofproc mgetty` + test -n "$mrun" && MGETTY_HASPLP=true +fi + +rc_reset + +start() { + if $MGETTY_HASPLP ; then + echo "NOT Starting ncpd because mgetty configured for PLP" + exit 0 + fi + echo -n "Starting Psion support (ncpd): " + startproc -f @prefix@/sbin/ncpd $NCPD_ARGS + if rc_status -v ; then + if [ "$START_PLPNFSD" = "yes" ] ; then + echo -n "Starting Psion support (plpnfsd): " + startproc -f @prefix@/sbin/plpnfsd $PLPNFSD_ARGS + rc_status -v + fi + if [ "$START_PLPPRINTD" = "yes" ] ; then + echo -n "Starting Psion support (plpprintd): " + startproc -f @prefix@/sbin/plpprintd $PLPPRINTD_ARGS + rc_status -v + fi + fi + rc_status && touch /var/lock/subsys/psion +} + +stop() { + echo -n "Stopping Psion support: " + if [ "$START_PLPNFSD" = "yes" ] ; then + killproc -HUP @prefix@/sbin/plpnfsd + WAIT=5 + while test $WAIT -gt 0 ; do + test -z "`pidofproc plpnfsd`" && break; + sleep 1 # allow plpnfsd flushing it's cache + WAIT=`expr $WAIT - 1` + done + test -n "`pidofproc plpnfsd`" && \ + killproc -TERM @prefix@/sbin/plpnfsd + rc_status + fi + if [ "$START_PLPPRINTD" = "yes" ] ; then + killproc -TERM @prefix@/sbin/plpprintd + rc_status + fi + killproc -TERM @prefix@/sbin/ncpd + rc_status -v && rm -f /var/lock/subsys/psion +} + +restart() { + stop + start +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + echo -n "Checking for service psion: " + checkproc @prefix@/sbin/plpnfsd && \ + checkproc @prefix@/sbin/plpprintd && \ + checkproc @prefix@/sbin/ncpd + rc_status -v + ;; + restart|reload) + restart + ;; + condrestart) + test -f /var/lock/subsys/psion && restart || : + ;; + *) + echo "Usage: psion {start|stop|status|restart|reload|condrestart}" + exit 1 +esac + +rc_exit -- cgit v1.2.3