[Pacemaker] [PATCH] suggested bashism fixes for hb2openais.sh

Raoul Bhatia [IPAX] r.bhatia at ipax.at
Tue Jul 6 14:45:13 UTC 2010


# HG changeset patch
# User Raoul Bhatia [IPAX] <r.bhatia at ipax.at>
# Date 1278427473 -7200
# Branch stable-1.0
# Node ID 6396b06964a167a53b57b80ab316c96c9de3ab39
# Parent  31401399d6334467296a60a13d0cea7641fc9358
suggested bashism fixes for hb2openais.sh

diff -r 31401399d633 -r 6396b06964a1 tools/hb2openais.sh.in
--- a/tools/hb2openais.sh.in	Tue Jul 06 16:29:38 2010 +0200
+++ b/tools/hb2openais.sh.in	Tue Jul 06 16:44:33 2010 +0200
@@ -384,10 +384,10 @@
 newstanza() {
 	do_tabs
 	printf "%s {\n" $1
-	let sw=sw+1
+	sw=$((sw+1))
 }
 endstanza() {
-	let sw=sw-1
+	sw=$((sw-1))
 	do_tabs
 	printf "}\n"
 }
@@ -441,7 +441,7 @@
 		fi
 		netaddress="`netaddress $iface`"
 		if [ "$netaddress" ]; then
-			let local_mcastport=$local_mcastport+1
+			local_mcastport=$((local_mcastport+1))
 			newportinfo $iface $local_mcastport
 			echo "$netaddress" "$mcastaddr" "$local_mcastport"
 		else
@@ -526,7 +526,7 @@
 	multicastinfo $ring $addr $port
 	setvalue mcastport $port
 	setvalue mcastaddr $addr
-	let ring=$ring+1
+	ring=$((ring+1))
 	endstanza
 done
 mediacnt=`gethbmedia 2>/dev/null | prochbmedia 2>/dev/null | sort -u | wc -l`
@@ -791,7 +791,7 @@
 		(cd / && tar cf - $DIST_FILES) |
 		ssh $ssh_opts $node "rm -f $REMOTE_RM_FILES &&
 			cd / && tar xf -"
-		let rc=$rc+$?
+		rc=$((rc+$?))
 	fi
 done
 info "Done transfering files"




More information about the Pacemaker mailing list