Eventscript functions - catch failures in ctdb_service_start().
authorMartin Schwenke <martin@meltin.net>
Thu, 18 Nov 2010 00:27:10 +0000 (11:27 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 18 Nov 2010 01:15:17 +0000 (12:15 +1100)
ctdb_service_start() currently succeeds if ctdb_counter_init()
succeeds.

This changes it to fail when a service start fails.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions

index a7e3e539110273a2feb071d886f267b133449b8d..5dd31fe09a8883c13f53e7f6135c69b00e29f569 100755 (executable)
@@ -706,9 +706,9 @@ ctdb_start_stop_service ()
 ctdb_service_start ()
 {
     if [ -n "$service_start" ] ; then
-       eval $service_start
+       eval $service_start || return $?
     else
-       service "$service_name" start
+       service "$service_name" start || return $?
     fi
     ctdb_counter_init
 }