From: Ronnie Sahlberg Date: Sun, 3 Jun 2007 09:24:52 +0000 (+1000) Subject: ubuntu uses a different style of init scripts than redhat and suse X-Git-Tag: tevent-0.9.20~348^2~2583^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dac3f7d23c97ec6b6329a7b472bb33431d609eb2;p=thirdparty%2Fsamba.git ubuntu uses a different style of init scripts than redhat and suse (This used to be ctdb commit 6d3bee5d1a7dd6718045c673cfd150e3207ea970) --- diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index 3f6575a2a93..ad7bd705312 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -66,8 +66,11 @@ CTDB_OPTIONS="$CTDB_OPTIONS --reclock=$CTDB_RECOVERY_LOCK" if [ -x /sbin/startproc ]; then init_style="suse" -else - init_style="redhat" +else if [ -x /sbin/start-stop-daemon ]; then + init_style="ubuntu" + else + init_style="redhat" + fi fi start() { @@ -85,6 +88,10 @@ start() { [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ctdb || RETVAL=1 return $RETVAL ;; + ubuntu) + start-stop-daemon --start --quiet --background --exec /usr/sbin/ctdbd -- $CTDB_OPTIONS + return $? + ;; esac }