From 67b623860c2d2437afe930bb3722ba18fbb72723 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Mon, 15 Jan 2001 00:18:37 +0000 Subject: Fixed some bugs in init-script. --- etc/psion.in | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/psion.in b/etc/psion.in index 5549846..b10938c 100755 --- a/etc/psion.in +++ b/etc/psion.in @@ -2,7 +2,7 @@ # # psion Starts ncpd/plpnfsd. # -# chkconfig: 2345 30 70 +# chkconfig: 2345 45 70 # description: This facility enables connectivity to a Psion series 5. # Source function library. @@ -12,8 +12,10 @@ [ -f @prefix@/sbin/plpnfsd ] || exit 0 MGETTY_HASPLP=false + if grep -qs ^/PLP/ /etc/mgetty+sendfax/login.config ; then - MGETTY_HASPLP=true + mrun=`pidofproc mgetty` + test -n "$mrun" && MGETTY_HASPLP=true fi # See how we were called. @@ -31,9 +33,11 @@ case "$1" in ;; stop) echo -n "Shutting down Psion support: " - if [ killproc plpnfsd -HUP ] ; then - sleep 10 # allow plpnfsd flushing it's cache - fi + killproc plpnfsd -HUP + while true ; do + test -z "`pidofproc plpnfsd`" && break; + sleep 1 # allow plpnfsd flushing it's cache + done killproc ncpd echo rm -f /var/lock/subsys/psion -- cgit v1.2.3