diff --git a/conserver/debian/patches/initscript.patch b/conserver/debian/patches/initscript.patch index db9323a..1131a40 100644 --- a/conserver/debian/patches/initscript.patch +++ b/conserver/debian/patches/initscript.patch @@ -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: "