[SCM] CTDB repository - branch master updated -
ctdb-1.0.68-7-g023d6c2
Ronnie Sahlberg
sahlberg at samba.org
Mon Dec 15 22:52:47 GMT 2008
The branch, master has been updated
via 023d6c2e3017d323b5a70f987f3b4e0b8b8f0f7b (commit)
via a1a0fa6eb37b5432cc2b176e252856d37fcc4fc8 (commit)
via 0f7444966d8147cf5a742320f51fbb9909d6d42d (commit)
via fac9ad26b2239818e6fc371fbfaa894fa64045be (commit)
via f3cb1386e7ea99adba78350bb50bf34d6bdcfe1d (commit)
via 7834d9b79bf4e4d3c6ce63dd4c3a1e40b9d909e4 (commit)
via 140768ce79d8ea3af2adb3ac011b58a29a09b50e (commit)
from e50c9667b86160eb5dfb9868aff420b72f799a5f (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 023d6c2e3017d323b5a70f987f3b4e0b8b8f0f7b
Author: Michael Adam <obnox at samba.org>
Date: Mon Dec 15 18:21:37 2008 +0100
skip directories containing macros (%) in ctdb_check_directories_probe
This prevents the monitor action of 50.samba from failing
on e.g. a typical [homes] service with "path = /home/%S" .
Michael
commit a1a0fa6eb37b5432cc2b176e252856d37fcc4fc8
Author: Michael Adam <obnox at samba.org>
Date: Sat Jul 5 14:28:27 2008 +0200
ctdb.init: add Default-Start to init script to enable autostart.
Michael
commit 0f7444966d8147cf5a742320f51fbb9909d6d42d
Author: Michael Adam <obnox at samba.org>
Date: Fri Dec 12 16:57:58 2008 +0100
ctdb.init: check availability of ctdb (with ping) before calling ctdb status
Michael
commit fac9ad26b2239818e6fc371fbfaa894fa64045be
Author: Michael Adam <obnox at samba.org>
Date: Fri Dec 12 16:00:07 2008 +0100
ctdb.init: behave correctly when calling "service ctdb stop" on stopped service
When "service ctdb stop" is called and the ctdbd is not running,
don't print the "Failed to connect to daemon" error messages.
But print a warning and exit with status success instead.
Michael
commit f3cb1386e7ea99adba78350bb50bf34d6bdcfe1d
Author: Michael Adam <obnox at samba.org>
Date: Fri Dec 12 16:05:04 2008 +0100
ctdb.init: fix return code of "service ctdb stop" on non-redhat systems
Michael
commit 7834d9b79bf4e4d3c6ce63dd4c3a1e40b9d909e4
Author: Michael Adam <obnox at samba.org>
Date: Fri Dec 12 16:04:29 2008 +0100
ctdb.init: fix status message of "service ctdb stop" on suse systems
Michael
commit 140768ce79d8ea3af2adb3ac011b58a29a09b50e
Author: Michael Adam <obnox at samba.org>
Date: Sat Jul 5 14:42:46 2008 +0200
packaging: set docdir in calls to make (to get it right on e.g. SuSE systems).
Currently docdir = /usr/share/doc is hardcoded in the Makefile.in.
Some systems use a different doc dir (SuSE uses /usr/share/doc/packages).
And not all versions of autoconf provide the --docdir parameter
(2.61 does, while 2.59 does not). So we use the quick solution
to specify "docdir=%{_docdir}" in the make calls in the spec file.
Michael
-----------------------------------------------------------------------
Summary of changes:
config/ctdb.init | 38 +++++++++++++++++++++++++++++++++++++-
config/functions | 1 +
packaging/RPM/ctdb.spec | 6 +++---
3 files changed, 41 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/ctdb.init b/config/ctdb.init
index 9e06c24..0d0053e 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -14,6 +14,7 @@
# Required-Start: $network
# Required-Stop:
# Default-Stop:
+# Default-Start: 3 5
# Short-Description: start and stop ctdb service
# Description: initscript for the ctdb service
### END INIT INFO
@@ -91,6 +92,10 @@ else if [ -x /sbin/start-stop-daemon ]; then
fi
fi
+reset_retval() {
+ return $1
+}
+
start() {
killall -q ctdbd
echo -n $"Starting ctdbd service: "
@@ -144,6 +149,18 @@ start() {
stop() {
echo -n $"Shutting down ctdbd service: "
+ ctdb ping >& /dev/null || {
+ echo -n " Warning: ctdbd not running ! "
+ case $init_style in
+ suse)
+ rc_status -v
+ ;;
+ redhat)
+ echo ""
+ ;;
+ esac
+ return 0
+ }
ctdb shutdown
RETVAL=$?
count=0
@@ -163,15 +180,18 @@ stop() {
done
case $init_style in
suse)
+ # re-set the return code to the recorded RETVAL
+ # in order to print the correct status message
+ set_retval $RETVAL
rc_status -v
;;
redhat)
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ctdb
echo ""
- return $RETVAL
;;
esac
+ return $RETVAL
}
restart() {
@@ -180,6 +200,22 @@ restart() {
}
status() {
+ echo -n $"Checking for ctdbd service: "
+ ctdb ping >& /dev/null || {
+ RETVAL=$?
+ echo -n " ctdbd not running. "
+ case $init_style in
+ suse)
+ set_retval $RETVAL
+ rc_status -v
+ ;;
+ redhat)
+ echo ""
+ ;;
+ esac
+ return $RETVAL
+ }
+ echo ""
ctdb status
}
diff --git a/config/functions b/config/functions
index 2c744d0..c6295c3 100644
--- a/config/functions
+++ b/config/functions
@@ -154,6 +154,7 @@ ctdb_check_directories_probe() {
wait_dirs="$*"
[ -z "$wait_dirs" ] && return;
for d in $wait_dirs; do
+ ( echo $d | grep -q '%' ) && continue
[ -d $d ] || return 1
done
return 0
diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 03ca7fc..c3f1f3a 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -45,8 +45,8 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -O0 -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{relea
--mandir=%{_mandir} \
--localstatedir="/var"
-make showflags
-make
+make docdir=%{_docdir} showflags
+make docdir=%{_docdir}
%install
# Clean up in case there is trash left from a previous build
@@ -56,7 +56,7 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
-make DESTDIR=$RPM_BUILD_ROOT install
+make DESTDIR=$RPM_BUILD_ROOT docdir=%{_docdir} install
install -m644 config/ctdb.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ctdb
install -m755 config/ctdb.init $RPM_BUILD_ROOT%{initdir}/ctdb
--
CTDB repository
More information about the samba-cvs
mailing list