92 lines
2.1 KiB
Diff
92 lines
2.1 KiB
Diff
From 0a9b838f4c53e0b69e93ba946e64e579dc6c5e17 Mon Sep 17 00:00:00 2001
|
|
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
|
Date: Fri, 17 Apr 2009 09:53:02 +0200
|
|
Subject: [PATCH] update initscript to Fedora standards
|
|
|
|
---
|
|
openhpid/openhpid.sh.in | 28 ++++++++++++++++------------
|
|
1 files changed, 16 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/openhpid/openhpid.sh.in b/openhpid/openhpid.sh.in
|
|
index 3e7c578..bc66a38 100644
|
|
--- a/openhpid/openhpid.sh.in
|
|
+++ b/openhpid/openhpid.sh.in
|
|
@@ -6,14 +6,15 @@
|
|
# Required-Stop: $network $remote_fs $syslog
|
|
# Should-Start: $named
|
|
# Should-Stop: $named
|
|
-# Default-Start: 2 3 4 5
|
|
-# Default-Stop: 0 1 6
|
|
+# Default-Start:
|
|
+# Default-Stop: 0 1 2 3 4 5 6
|
|
# Short-Description: Start OpenHPI daemon at boot time
|
|
# Description: Enable OpenHPI service which is provided by openhpid.
|
|
### END INIT INFO
|
|
#
|
|
# openhpid.sh Start/Stop the openhpi daemon.
|
|
#
|
|
+# chkconfig: - 90 10
|
|
# description: openhpid is standard UNIX program which uses the OpenHPI \
|
|
# APIs and provides a standard internet server to access those \
|
|
# APIs for client programs.
|
|
@@ -125,6 +126,8 @@ start() {
|
|
esac
|
|
|
|
print_outcome
|
|
+
|
|
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/openhpid
|
|
|
|
}
|
|
|
|
@@ -158,11 +161,7 @@ stop() {
|
|
|
|
print_outcome
|
|
|
|
- if test "$RETVAL" -eq 0 && test -f /var/run/openhpid.pid
|
|
- then
|
|
- rm -f /var/lock/openhpid
|
|
- rm -f /var/run/openhpid.pid
|
|
- fi
|
|
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/openhpid
|
|
|
|
}
|
|
|
|
@@ -210,11 +209,13 @@ restart() {
|
|
start
|
|
}
|
|
|
|
+condrestart() {
|
|
+ [ -f /var/lock/subsys/openhpid ] && restart || :
|
|
+}
|
|
+
|
|
force_reload() {
|
|
- echo -n $"Force-reload not supported."
|
|
- echo
|
|
- return 0
|
|
-}
|
|
+ restart
|
|
+}
|
|
|
|
# See how we were called.
|
|
|
|
@@ -228,6 +229,9 @@ case "$1" in
|
|
restart)
|
|
restart
|
|
;;
|
|
+ condrestart|try-restart)
|
|
+ condrestart
|
|
+ ;;
|
|
status)
|
|
dstatus
|
|
;;
|
|
@@ -235,6 +239,6 @@ case "$1" in
|
|
force_reload
|
|
;;
|
|
*)
|
|
- echo $"Usage: $0 {start|stop|restart|status|force-reload}"
|
|
+ echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|status|force-reload}"
|
|
exit 1
|
|
esac
|
|
--
|
|
1.6.0.6
|
|
|