[SCM] CTDB repository - branch master updated - ctdb-1.0.113-131-g3d82ca5
Ronnie Sahlberg
sahlberg at samba.org
Tue Mar 9 23:42:15 MST 2010
The branch, master has been updated
via 3d82ca5b1b8ba2770c739493aa0cdd34bb4827d8 (commit)
via e21b40db64b314a24caa2bc611cb48b93decb5aa (commit)
from 51fce280d3a7e2cce8e6e268a19d3594b38b9bb6 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3d82ca5b1b8ba2770c739493aa0cdd34bb4827d8
Author: Mathieu Parent <math.parent at gmail.com>
Date: Thu Mar 4 16:06:11 2010 +0100
Fix some more bashisms
commit e21b40db64b314a24caa2bc611cb48b93decb5aa
Author: Mathieu Parent <math.parent at gmail.com>
Date: Mon Mar 8 21:19:35 2010 +0100
Correct nice_service()
nice takes a binary as argument and not a function or builtin command
-----------------------------------------------------------------------
Summary of changes:
config/events.d/11.natgw | 2 +-
config/events.d/13.per_ip_routing | 11 ++++++++---
config/functions | 13 +++++++++++--
3 files changed, 20 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/events.d/11.natgw b/config/events.d/11.natgw
index 18db3de..b226b81 100644
--- a/config/events.d/11.natgw
+++ b/config/events.d/11.natgw
@@ -41,7 +41,7 @@ case "$1" in
NATGWIP=`ctdb natgwlist | head -1 | sed -e "s/^[^ ]* *//"`
CTDB_NATGW_PUBLIC_IP_HOST=`echo $CTDB_NATGW_PUBLIC_IP | sed -e "s/\/.*/\/32/"`
- if [ "$NATGWMASTER" == "-1" ]; then
+ if [ "$NATGWMASTER" = "-1" ]; then
echo "There is not NATGW master node"
exit 1
fi
diff --git a/config/events.d/13.per_ip_routing b/config/events.d/13.per_ip_routing
index b8a1e3e..e85ba66 100755
--- a/config/events.d/13.per_ip_routing
+++ b/config/events.d/13.per_ip_routing
@@ -75,7 +75,7 @@ lock_file() {
stat -c%y "$lckf"
return 1
}
- kill -0 $pid && {
+ /bin/kill -0 $pid && {
lock_debug "lock file $lckf is valid for process $pid"
stat -c%y "$lckf"
return 1
@@ -165,7 +165,10 @@ run_release_script_once()
#echo "run it: end"
}
- echo -e "#!/bin/sh\n#\n" > $_script
+ echo '#!/bin/sh' > $_script
+ echo '#' >> $_script
+ echo >> $_script
+
chmod +x $_script
return 0;
@@ -230,7 +233,9 @@ generate_per_ip_routing()
run_release_script_once $release_script
- echo -e "#!/bin/sh\n#\n" > $setup_script
+ echo '#!/bin/sh' > $setup_script
+ echo '#' >> $setup_script
+ echo >> $setup_script
chmod +x $setup_script
return 0;
diff --git a/config/functions b/config/functions
index b70a352..6556b21 100644
--- a/config/functions
+++ b/config/functions
@@ -61,10 +61,19 @@ service() {
######################################################
# simulate /sbin/service (niced) on platforms that don't have it
nice_service() {
+ _service_name="$1"
+ _op="$2"
+
# do nothing, when no service was specified
- [ -z "$1" ] && return
+ [ -z "$_service_name" ] && return
- nice service "$@"
+ if [ -x /sbin/service ]; then
+ nice /sbin/service "$_service_name" "$_op"
+ elif [ -x /etc/init.d/$_service_name ]; then
+ nice /etc/init.d/$_service_name "$_op"
+ elif [ -x /etc/rc.d/init.d/$_service_name ]; then
+ nice /etc/rc.d/init.d/$_service_name "$_op"
+ fi
}
######################################################
--
CTDB repository
More information about the samba-cvs
mailing list