[patch] 0.9.7: fix initscript
Tim Waugh <[email protected]> Thu, 5 Jan 2006 11:25:39 +0000
| Newsgroups | gmane.linux.drivers.hpofficejet.devel |
|---|---|
| Message-ID | <[email protected]> |
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
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click