scripts: Ensure service command is in $PATH in ctdb-crash-cleanup.sh
authorMartin Schwenke <martin@meltin.net>
Fri, 19 Apr 2013 03:10:27 +0000 (13:10 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 19 Apr 2013 03:12:36 +0000 (13:12 +1000)
Move the use of the service command below inclusion of functions file,
which sets $PATH.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d254d03f69cbdc3e473202b759af6e1392cbb59c)

ctdb/config/ctdb-crash-cleanup.sh

index 7796223b36b8370db9878098603be5474d7b859a..b62e3c3abb3455965d86c722566878cffa79d2dd 100755 (executable)
@@ -4,16 +4,16 @@
 # all public ip addresses if CTDBD has crashed or stopped running.
 #
 
-# If ctdb is running, just exit
-if service ctdb status >/dev/null 2>&1 ; then
-    exit 0
-fi
-
 [ -n "$CTDB_BASE" ] || \
     export CTDB_BASE=$(cd -P $(dirname "$0") ; echo "$PWD")
 
 . "$CTDB_BASE/functions"
 
+# If ctdb is running, just exit
+if service ctdb status >/dev/null 2>&1 ; then
+    exit 0
+fi
+
 loadconfig ctdb
 
 [ -n "$CTDB_PUBLIC_ADDRESSES" ] || \