Fix some more bashisms
authorMathieu Parent <math.parent@gmail.com>
Thu, 4 Mar 2010 15:06:11 +0000 (16:06 +0100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 10 Mar 2010 06:41:40 +0000 (17:41 +1100)
config/events.d/11.natgw
config/events.d/13.per_ip_routing

index 18db3dee9987fa09d05cd0d53d34730d774c88eb..b226b8110b369bc32fdc59de6aa3aac779a29f96 100644 (file)
@@ -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
index b8a1e3e003520f21293df8d9aad470b19f3893f8..e85ba66e52c20c30b02c95ad36e4faed60ed11f9 100755 (executable)
@@ -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;