From d46d120295bc494bf8427b4c730f0a8bc59e6ee3 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Thu, 4 Mar 2010 16:06:11 +0100 Subject: [PATCH] Fix some more bashisms --- config/events.d/11.natgw | 2 +- config/events.d/13.per_ip_routing | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) 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; -- 1.6.6.1