From: Tim W. <tw...@re...> - 2006-01-05 11:26:00
|
Hi, Here is a patch to make the initscript more robust. Original bug report: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176966 "It doesn't create /var/lock/subsys/hplip without this /etc/rc.d/rc will try to start it again when switching runlevels even if its already running." Tim. */ --- hplip-0.9.7/hplip.sh.initscript 2005-09-22 19:33:13.000000000 +0100 +++ hplip-0.9.7/hplip.sh 2006-01-05 11:16:42.000000000 +0000 @@ -106,7 +106,12 @@ echo [ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpssd.py # killall -HUP cupsd - return $RETVAL + if [ -f /var/lock/subsys/hpiod -a -f /var/lock/subsys/hpssd.py ]; then + touch /var/lock/subsys/hplip + return 0 + else + return 1 + fi } stop() { @@ -128,6 +133,10 @@ rm $pidfile esac done + if [ ! -f /var/lock/subsys/hpiod -o \ + ! -f /var/lock/subsys/hpssd.py ]; then + rm -f /var/lock/subsys/hplip + fi return $RETVAL } |