]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ubuntu uses a different style of init scripts than redhat and suse
authorRonnie Sahlberg <sahlberg@ronnie>
Sun, 3 Jun 2007 09:24:52 +0000 (19:24 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Sun, 3 Jun 2007 09:24:52 +0000 (19:24 +1000)
(This used to be ctdb commit 6d3bee5d1a7dd6718045c673cfd150e3207ea970)

ctdb/config/ctdb.init

index 3f6575a2a93a7f301f7dbb965636fa2e58dd7c1f..ad7bd7053129923fb545d644025b34e6dd519e65 100755 (executable)
@@ -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
 }