ctdb-scripts: Try to deal with Ubuntu having /usr/sbin/service
authorMartin Schwenke <martin@meltin.net>
Mon, 1 Dec 2014 01:21:16 +0000 (12:21 +1100)
committerMichael Adam <obnox@samba.org>
Fri, 9 Jan 2015 01:03:40 +0000 (02:03 +0100)
Falling back to running the initscript doesn't work because it detects
that upstart is being used and fails.  This was observed when trying
to start winbind on Ubuntu 11.04.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/config/functions

index 23cb2364e3e119c4296c950ac1f62fb9cee16eff..df818a03231932e3fdc24176cfd72f78d7a8399b 100755 (executable)
@@ -171,6 +171,8 @@ _service ()
 
   if [ -x /sbin/service ]; then
       $_nice /sbin/service "$_service_name" "$_op"
+  elif [ -x /usr/sbin/service ]; then
+      $_nice /usr/sbin/service "$_service_name" "$_op"
   elif [ -x $CTDB_ETCDIR/init.d/$_service_name ]; then
       $_nice $CTDB_ETCDIR/init.d/$_service_name "$_op"
   elif [ -x $CTDB_ETCDIR/rc.d/init.d/$_service_name ]; then