aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-01-15 00:18:37 +0000
committerFritz Elfert <felfert@to.com>2001-01-15 00:18:37 +0000
commit67b623860c2d2437afe930bb3722ba18fbb72723 (patch)
treec28a9b7b8873589c92a2b4caed8db0f9a9cab4fb /etc
parentf6d25b8861f97439d7086e4569e209c46486d009 (diff)
downloadplptools-67b623860c2d2437afe930bb3722ba18fbb72723.tar.gz
plptools-67b623860c2d2437afe930bb3722ba18fbb72723.tar.bz2
plptools-67b623860c2d2437afe930bb3722ba18fbb72723.zip
Fixed some bugs in init-script.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/psion.in14
1 files changed, 9 insertions, 5 deletions
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