[Pkg-samba-maint] r3722 - trunk/ctdb/debian

sathieu at alioth.debian.org sathieu at alioth.debian.org
Sat Mar 26 17:47:00 UTC 2011


Author: sathieu
Date: 2011-03-26 17:46:59 +0000 (Sat, 26 Mar 2011)
New Revision: 3722

Modified:
   trunk/ctdb/debian/changelog
   trunk/ctdb/debian/ctdb.init
Log:
Updated init script

Modified: trunk/ctdb/debian/changelog
===================================================================
--- trunk/ctdb/debian/changelog	2011-03-26 17:32:17 UTC (rev 3721)
+++ trunk/ctdb/debian/changelog	2011-03-26 17:46:59 UTC (rev 3722)
@@ -8,7 +8,7 @@
     - removed 70-nfstickle-sysconfig.diff, fixed upstream
     - removed 71-correct-nice_service.diff, merged upstream
     - added 62-spelling-errors.diff, again
-  * debian/watch, debian/uupdate-wrapper: use new upstream git url
+  * d/watch, d/uupdate-wrapper: use new upstream git url
   * Switch to dpkg-source 3.0 (quilt) format
   * Bump Standards-Version to 3.9.1: no changes
   * Added 70-ping_pong-manpage.diff
@@ -16,8 +16,9 @@
   * Upgrading to debhelper 7
     - Replaced 'dh_clean -k -i' by 'dh_prep -i'
   * New package ctdb-dev (ctdb depend on it for smooth builddep migration)
+  * d/ctdb.init: updated
 
- -- Mathieu Parent <sathieu at debian.org>  Sat, 26 Mar 2011 18:28:29 +0100
+ -- Mathieu Parent <sathieu at debian.org>  Sat, 26 Mar 2011 18:46:15 +0100
 
 ctdb (1.0.112-12-1) unstable; urgency=low
 

Modified: trunk/ctdb/debian/ctdb.init
===================================================================
--- trunk/ctdb/debian/ctdb.init	2011-03-26 17:32:17 UTC (rev 3721)
+++ trunk/ctdb/debian/ctdb.init	2011-03-26 17:46:59 UTC (rev 3722)
@@ -3,20 +3,20 @@
 ##############################
 # ctdb:                        Starts the clustered tdb daemon
 #
-# chkconfig:           - 90 36
+# chkconfig:           - 90 01
 #
 # description:                 Starts and stops the clustered tdb daemon
 # pidfile:             /var/run/ctdbd/ctdbd.pid
 #
 
 ### BEGIN INIT INFO
-# Provides:          ctdb
-# Required-Start:    $network $local_fs $remote_fs
-# Required-Stop:     $network $local_fs $remote_fs
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: start and stop ctdb service
-# Description:       initscript for the ctdb service
+# Provides:            ctdb
+# Required-Start:      $network $local_fs $remote_fs
+# Required-Stop:       $network $local_fs $remote_fs
+# Default-Start:       2 3 4 5
+# Default-Stop:        0 1 6
+# Short-Description:   start and stop ctdb service
+# Description:         initscript for the ctdb service
 ### END INIT INFO
 
 
@@ -101,6 +101,10 @@
     export CTDB_BASE="/etc/ctdb"
 }
 
+[ -z "$CTDB_VARDIR" ] && {
+    export CTDB_VARDIR="/var/lib/ctdb"
+}
+
 . $CTDB_BASE/functions
 loadconfig network
 loadconfig ctdb
@@ -126,23 +130,23 @@
 build_ctdb_options () {
 
     maybe_set () {
-        # If the 2nd arg is null then return - don't set anything.
-        # Else if the 3rd arg is set and it doesn't match the 2nd arg
-        # then return
-        [ -z "$2" -o \( -n "$3" -a "$3" != "$2" \) ] && return
+	# If the 2nd arg is null then return - don't set anything.
+	# Else if the 3rd arg is set and it doesn't match the 2nd arg
+	# then return
+	[ -z "$2" -o \( -n "$3" -a "$3" != "$2" \) ] && return
 
-        val="$2"
-        case "$1" in
-            --*) sep="=" ;;
-            -*)  sep=" " ;;
-        esac
-        # For these options we're only passing a value-less flag.
-        [ -n "$3" ] && {
-            val=""
-            sep=""
-        }
+	val="'$2'"
+	case "$1" in
+	    --*) sep="=" ;;
+	    -*)  sep=" " ;;
+	esac
+	# For these options we're only passing a value-less flag.
+	[ -n "$3" ] && {
+	    val=""
+	    sep=""
+	}
 
-        CTDB_OPTIONS="${CTDB_OPTIONS}${CTDB_OPTIONS:+ }${1}${sep}${val}"
+	CTDB_OPTIONS="${CTDB_OPTIONS}${CTDB_OPTIONS:+ }${1}${sep}${val}"
     }
 
     [ -z "$CTDB_RECOVERY_LOCK" ] && {
@@ -168,6 +172,7 @@
     maybe_set "--no-lmaster"             "$CTDB_CAPABILITY_LMASTER"   "no"
     maybe_set "--lvs --single-public-ip" "$CTDB_LVS_PUBLIC_IP"
     maybe_set "--script-log-level"       "$CTDB_SCRIPT_LOG_LEVEL"
+    maybe_set "--log-ringbuf-size"       "$CTDB_LOG_RINGBUF_SIZE"
     maybe_set "--syslog"                 "$CTDB_SYSLOG"               "yes"
     maybe_set "--max-persistent-check-errors" "$CTDB_MAX_PERSISTENT_CHECK_ERRORS"
 }
@@ -211,10 +216,10 @@
 	return 0;
     }
     for PDBASE in `ls $PERSISTENT_DB_DIR/*.tdb.[0-9] 2>/dev/null`; do
-        check_tdb $PDBASE || {
-        echo "Persistent database $PDBASE is corrupted! CTDB will not start."
-        return 1
-    }
+	check_tdb $PDBASE || {
+	    echo "Persistent database $PDBASE is corrupted! CTDB will not start."
+	    return 1
+	}
     done
 }
 
@@ -222,9 +227,9 @@
     # set any tunables from the config file
     set | grep ^CTDB_SET_ | cut -d_ -f3- | 
     while read v; do
-        varname=`echo $v | cut -d= -f1`
-        value=`echo $v | cut -d= -f2`
-        ctdb setvar $varname $value || RETVAL=1
+	varname=`echo $v | cut -d= -f1`
+	value=`echo $v | cut -d= -f2`
+	ctdb setvar $varname $value || RETVAL=1
     done || exit 1
 }
 





More information about the Pkg-samba-maint mailing list