The Samba-Bugzilla – Attachment 4204 Details for
Bug 6407
[CTDB] Please fix bashisms in shell scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix bashism
50-fix-bashism.diff (text/plain), 3.22 KB, created by
Mathieu Parent
on 2009-05-25 16:13:26 UTC
(
hide
)
Description:
Fix bashism
Filename:
MIME Type:
Creator:
Mathieu Parent
Created:
2009-05-25 16:13:26 UTC
Size:
3.22 KB
patch
obsolete
>Goal: Fix bashism > >See http://bugs.debian.org/530064 > >Author: Mathieu Parent <math.parent@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 > ) &
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6407
:
4203
| 4204 |
4753
|
5458
|
6342