ctdb.init: fix status message of "service ctdb stop" on suse systems
authorMichael Adam <obnox@samba.org>
Fri, 12 Dec 2008 15:04:29 +0000 (16:04 +0100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 15 Dec 2008 22:50:47 +0000 (09:50 +1100)
Michael

config/ctdb.init

index 9e06c243288948fe2ba79271c489d665e15bb218..629b1946ea82d91297b2aa7c71368989e6f45f82 100755 (executable)
@@ -91,6 +91,10 @@ else if [ -x /sbin/start-stop-daemon ]; then
 fi
 fi
 
+reset_retval() {
+       return $1
+}
+
 start() {
         killall -q ctdbd
        echo -n $"Starting ctdbd service: "
@@ -163,6 +167,9 @@ stop() {
        done
        case $init_style in
            suse)
+               # re-set the return code to the recorded RETVAL
+               # in order to print the correct status message
+               set_retval $RETVAL
                rc_status -v
                ;;
            redhat)