[Pkg-samba-maint] r2790 - in trunk/ctdb/debian: . patches
mparent-guest at alioth.debian.org
mparent-guest at alioth.debian.org
Mon May 25 21:12:21 UTC 2009
tags 530064 pending
thanks
Author: mparent-guest
Date: 2009-05-25 21:12:20 +0000 (Mon, 25 May 2009)
New Revision: 2790
Added:
trunk/ctdb/debian/patches/50-fix-bashism.diff
Modified:
trunk/ctdb/debian/changelog
trunk/ctdb/debian/patches/series
Log:
50-fix-bashism.diff: Fix "bashism in /bin/sh script"
Modified: trunk/ctdb/debian/changelog
===================================================================
--- trunk/ctdb/debian/changelog 2009-05-24 20:31:10 UTC (rev 2789)
+++ trunk/ctdb/debian/changelog 2009-05-25 21:12:20 UTC (rev 2790)
@@ -1,3 +1,9 @@
+ctdb (1.0.82-2) unstable; urgency=low
+
+ * 50-fix-bashism.diff: Fix "bashism in /bin/sh script" (Closes: #530064)
+
+ -- Mathieu Parent <math.parent at gmail.com> Mon, 25 May 2009 23:10:56 +0200
+
ctdb (1.0.82-1) unstable; urgency=low
* new upstream release
Added: trunk/ctdb/debian/patches/50-fix-bashism.diff
===================================================================
--- trunk/ctdb/debian/patches/50-fix-bashism.diff (rev 0)
+++ trunk/ctdb/debian/patches/50-fix-bashism.diff 2009-05-25 21:12:20 UTC (rev 2790)
@@ -0,0 +1,101 @@
+Goal: Fix bashism
+
+See http://bugs.debian.org/530064
+
+Author: Mathieu Parent <math.parent at gmail.com>
+
+Upstream status: https://bugzilla.samba.org/show_bug.cgi?id=6407
+
+Index: b/config/events.d/00.ctdb
+===================================================================
+--- a/config/events.d/00.ctdb
++++ b/config/events.d/00.ctdb
+@@ -27,7 +27,11 @@
+ # periodic vacuum function
+ periodic_vacuum() {
+ # this cleans up dead records and repacks the databases
+- ( time ctdb vacuum 200000 -T 30; time ctdb repack -T 30 ) > $CTDB_BASE/state/vacuum.log 2>&1 &
++ if [ "$(command -v time)" ]; then
++ ( time ctdb vacuum 200000 -T 30; time ctdb repack -T 30 ) > $CTDB_BASE/state/vacuum.log 2>&1 &
++ else
++ ( ctdb vacuum 200000 -T 30; ctdb repack -T 30 ) > $CTDB_BASE/state/vacuum.log 2>&1 &
++ fi
+ }
+
+ case $cmd in
+Index: b/config/events.d/11.natgw
+===================================================================
+--- a/config/events.d/11.natgw
++++ b/config/events.d/11.natgw
+@@ -44,7 +44,7 @@
+
+ delete_all
+
+- if [ "$MYPNN" == "$NATGWMASTER" ]; then
++ if [ "$MYPNN" = "$NATGWMASTER" ]; then
+ # This is the first node, set it up as the NAT GW
+ echo 1 >/proc/sys/net/ipv4/ip_forward
+ iptables -A POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK -d ! $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE
+Index: b/config/events.d/20.multipathd
+===================================================================
+--- a/config/events.d/20.multipathd
++++ b/config/events.d/20.multipathd
+@@ -52,7 +52,7 @@
+ timeleft=$(($timeleft - 1))
+
+ # see if the process still exists
+- kill -0 $pid > /dev/null 2>&1 || {
++ /bin/kill -0 $pid > /dev/null 2>&1 || {
+ # it doesn't exist, grab its exit status
+ wait $pid
+ [ $? = 0 ] || {
+@@ -87,7 +87,7 @@
+
+ monitor)
+ multipathd_check
+- [ "$?" == "0" ] || {
++ [ "$?" = "0" ] || {
+ echo 20.multipathd: monitoring of multipathing failed
+ exit 1
+ }
+Index: b/config/events.d/61.nfstickle
+===================================================================
+--- a/config/events.d/61.nfstickle
++++ b/config/events.d/61.nfstickle
+@@ -25,13 +25,12 @@
+ takeip)
+ iface=$1
+ ip=$2
+- shopt -s nullglob
+ # first send a grat arp, to ensure the client knows the updated
+ # mac address for this IP
+ ctdb gratiousarp $ip $iface
+ # send tickle acks for all the connections the old server had
+ for f in $NFS_TICKLE_SHARED_DIRECTORY/*/$ip; do
+- cat $f | while read dest; do
++ [ -f $f ] && cat $f | while read dest; do
+ dip=`echo $dest | cut -d: -f1`
+ dport=`echo $dest | cut -d: -f2`
+ # send three, in case of lost packets
+Index: b/config/events.d/50.samba
+===================================================================
+--- a/config/events.d/50.samba
++++ b/config/events.d/50.samba
+@@ -72,7 +72,7 @@
+ while [ $timeleft -gt 0 ]; do
+ timeleft=$(($timeleft - 1))
+ # see if the process still exists
+- kill -0 $pid > /dev/null 2>&1 || {
++ /bin/kill -0 $pid > /dev/null 2>&1 || {
+ # it doesn't exist, grab its exit status
+ wait $pid
+ [ $? = 0 ] || {
+@@ -98,7 +98,7 @@
+ done
+ # it took more than 10 seconds - kill it off
+ rm -f "${tmpfile}"
+- kill -9 "$pid" > /dev/null 2>&1
++ /bin/kill -9 "$pid" > /dev/null 2>&1
+ echo "50.samba: timed out updating smbconf cache in background"
+ exit 1
+ ) &
Modified: trunk/ctdb/debian/patches/series
===================================================================
--- trunk/ctdb/debian/patches/series 2009-05-24 20:31:10 UTC (rev 2789)
+++ trunk/ctdb/debian/patches/series 2009-05-25 21:12:20 UTC (rev 2790)
@@ -1,2 +1,3 @@
02_ctdb_diagnostics.diff
10_no-lib64.diff
+50-fix-bashism.diff
More information about the Pkg-samba-maint
mailing list