[Pkg-samba-maint] r2675 - trunk/ctdb/debian
mparent-guest at alioth.debian.org
mparent-guest at alioth.debian.org
Thu Mar 26 17:19:06 UTC 2009
Author: mparent-guest
Date: 2009-03-26 17:19:06 +0000 (Thu, 26 Mar 2009)
New Revision: 2675
Modified:
trunk/ctdb/debian/changelog
trunk/ctdb/debian/ctdb.init
Log:
* ctdb.init:
- Default-Stop: 0 1 6
- Should-{Start,Stop}: samba
- renamed functions: start -> start_server, stop -> stop_server
Modified: trunk/ctdb/debian/changelog
===================================================================
--- trunk/ctdb/debian/changelog 2009-03-26 16:03:49 UTC (rev 2674)
+++ trunk/ctdb/debian/changelog 2009-03-26 17:19:06 UTC (rev 2675)
@@ -5,8 +5,12 @@
- updated ctdb.init (from 1.0.75)
* fix debian/uupdate-wrapper to use "git clone" instead of "git-clone"
* Updated Standards-Version to 3.8.1: no changes
+ * ctdb.init:
+ - Default-Stop: 0 1 6
+ - Should-{Start,Stop}: samba
+ - renamed functions: start -> start_server, stop -> stop_server
- -- Mathieu Parent <math.parent at gmail.com> Thu, 26 Mar 2009 16:57:10 +0100
+ -- Mathieu Parent <math.parent at gmail.com> Thu, 26 Mar 2009 18:13:48 +0100
ctdb (1.0.73-1) unstable; urgency=low
Modified: trunk/ctdb/debian/ctdb.init
===================================================================
--- trunk/ctdb/debian/ctdb.init 2009-03-26 16:03:49 UTC (rev 2674)
+++ trunk/ctdb/debian/ctdb.init 2009-03-26 17:19:06 UTC (rev 2675)
@@ -10,13 +10,15 @@
#
### BEGIN INIT INFO
-# Provides: ctdb
-# Required-Start: $network $local_fs $remote_fs
-# Required-Stop: $network $local_fs $remote_fs
-# Default-Stop:
-# Default-Start: 2 3 4 5
-# 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
+# Should-Start: samba
+# Should-Stop: samba
+# 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
@@ -27,7 +29,6 @@
DESC="Clustered TDB"
test -x $DAEMON || exit 0
-test -x $DAEMON_WRAPPER || exit 0
# Source function library.
if [ -f /lib/lsb/init-functions ] ; then
@@ -112,11 +113,18 @@
return 1
}
-start() {
+start_server() {
killall -q ctdbd
# check all persistent databases that they look ok
- PERSISTENT_DB_DIR="/var/lib/ctdb/persistent"
+ case $init_style in
+ ubuntu)
+ PERSISTENT_DB_DIR="/var/lib/ctdb/persistent"
+ ;;
+ *)
+ PERSISTENT_DB_DIR="/var/ctdb/persistent"
+ ;;
+ esac
[ -z "$CTDB_DBDIR" ] || {
PERSISTENT_DB_DIR="$CTDB_DBDIR/persistent"
}
@@ -144,7 +152,7 @@
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ctdb || RETVAL=1
;;
- debian|ubuntu)
+ ubuntu)
start-stop-daemon --start --quiet --background --exec /usr/sbin/ctdbd -- $CTDB_OPTIONS
RETVAL=$?
;;
@@ -162,7 +170,7 @@
return $RETVAL
}
-stop() {
+stop_server() {
ctdb shutdown
RETVAL=$?
count=0
@@ -170,7 +178,7 @@
# very crude method
sleep 2
pkill -9 -f valgrind
- else if [ "$init_style" = "debian" ]; then
+ else if [ "$init_style" = "ubuntu" ]; then
start-stop-daemon --stop --quiet --exec /usr/sbin/ctdbd
RETVAL=$?
fi
@@ -200,9 +208,9 @@
return $RETVAL
}
-restart() {
- stop
- start
+restart_server() {
+ stop_server
+ start_server
}
status() {
@@ -219,7 +227,7 @@
log_end_msg 0
exit 0
fi
- if start && running ; then
+ if start_server && running ; then
# It's ok, the server started and is running
log_end_msg 0
else
@@ -235,7 +243,7 @@
log_daemon_msg "Stopping $DESC" "$NAME"
if running ; then
# Only stop the server if we see it running
- stop
+ stop_server
log_end_msg $?
else
# If it's not running don't do anything
@@ -246,8 +254,8 @@
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
- running && stop
- start
+ running && stop_server
+ start_server
running
log_end_msg $?
;;
More information about the Pkg-samba-maint
mailing list