2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-21 17:11:45 +00:00

make the conserver be LSB compatible, when conserver is not running, service conserver stop should exit 0, service conserver status should exit 3

Former-commit-id: dd6fcfb6ddeccd1d7ec7bbe15c3749b5a1a6cf74
This commit is contained in:
ligc 2013-05-24 06:52:09 +00:00
parent a1847f72b5
commit 2d7f45b073

View File

@ -1,10 +1,19 @@
diff -urN conserver-8.1.16/contrib/redhat-rpm/conserver.init conserver-8.1.16-diffinit/contrib/redhat-rpm/conserver.init
--- conserver-8.1.16/contrib/redhat-rpm/conserver.init 2003-02-27 21:06:50.000000000 -0500
+++ conserver-8.1.16-diffinit/contrib/redhat-rpm/conserver.init 2008-06-27 12:05:28.000000000 -0400
@@ -6,15 +6,53 @@
--- conserver-8.1.16/contrib/redhat-rpm/conserver.init 2003-02-28 10:06:50.000000000 +0800
+++ conserver-8.1.16-diffinit/contrib/redhat-rpm/conserver.init 2013-05-24 14:36:21.006320225 +0800
@@ -6,15 +6,63 @@
# description: conserver is a serial-port console daemon
# config: /etc/conserver.cf
#
+### BEGIN INIT INFO
+# Provides: conserver
+# Required-Start:
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-stop:
+# Short-Description: conserver
+# Description: Console server
+### END INIT INFO
+
+RHPassed()
+{
+ passed
@ -62,7 +71,7 @@ diff -urN conserver-8.1.16/contrib/redhat-rpm/conserver.init conserver-8.1.16-di
# make sure conserver is installed and executable
[ -x /usr/sbin/conserver ] || exit 1
@@ -24,23 +62,44 @@
@@ -24,23 +72,45 @@
case "$1" in
start)
echo -n "Starting conserver: "
@ -82,7 +91,7 @@ diff -urN conserver-8.1.16/contrib/redhat-rpm/conserver.init conserver-8.1.16-di
+ if [ "$?" != "0" ]; then
+ echo -n "conserver not running, not stopping "
+ $PASSED
+ exit 1
+ exit 0
+ fi
echo -n "Shutting down conserver: "
killproc conserver
@ -98,6 +107,7 @@ diff -urN conserver-8.1.16/contrib/redhat-rpm/conserver.init conserver-8.1.16-di
status)
- status conserver
+ $STATUS conserver
+ exit $?
;;
restart)
- echo -n "Restarting conserver: "