aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-15 19:18:58 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-15 19:20:45 +0200
commit08dfafc43757c42971b4bc3709ae7a5cda7c21fb (patch)
tree21d09e64ae9858c8285410ebd6aae6a17439efe1
parented2b9225371a36dd2694df65e395dc32fd94c5dd (diff)
downloadbusybox-08dfafc43757c42971b4bc3709ae7a5cda7c21fb.tar.gz
fix more instances of ": $((a++))" in shell scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-xexamples/mdev.conf.change_blockdev.sh2
-rwxr-xr-xexamples/var_service/dhcp_if_pinger/run2
-rwxr-xr-xutil-linux/mkfs_ext2_test.sh12
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/mdev.conf.change_blockdev.sh b/examples/mdev.conf.change_blockdev.sh
index 512e43fcc..252d30f53 100755
--- a/examples/mdev.conf.change_blockdev.sh
+++ b/examples/mdev.conf.change_blockdev.sh
@@ -14,7 +14,7 @@ env | sort
while sleep 1; test $cnt != 0; do
echo "Trying to reread partition table on $DEVNAME ($cnt)"
- : $((cnt--))
+ cnt=$((cnt-1))
# If device node doesn't exist, it means the device was removed.
# Stop trying.
test -e "$DEVNAME" || { echo "$DEVNAME doesn't exist, aborting"; exit 1; }
diff --git a/examples/var_service/dhcp_if_pinger/run b/examples/var_service/dhcp_if_pinger/run
index e0e87a16a..8aca90c1a 100755
--- a/examples/var_service/dhcp_if_pinger/run
+++ b/examples/var_service/dhcp_if_pinger/run
@@ -30,7 +30,7 @@ test x"$router" != x"" || exec env - sleep "$ping_time"
failcnt=0
while true; do
ping $ping_opts "$router" && exec env - sleep "$ping_time"
- : $((failcnt++))
+ failcnt=$((failcnt+1))
msg "Failed to ping $router, fail count:$failcnt"
test $failcnt -ge $max_fail && break
env - sleep "$retry_time"
diff --git a/util-linux/mkfs_ext2_test.sh b/util-linux/mkfs_ext2_test.sh
index f5347cc04..df22963f2 100755
--- a/util-linux/mkfs_ext2_test.sh
+++ b/util-linux/mkfs_ext2_test.sh
@@ -47,7 +47,7 @@ test_mke2fs() {
kilobytes=60
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = 200 && break
done
@@ -56,7 +56,7 @@ done
kilobytes=$((1 * 8*1024 - 50))
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = $((1 * 8*1024 + 300)) && break
done
@@ -65,7 +65,7 @@ done
kilobytes=$((2 * 8*1024 - 50))
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = $((2 * 8*1024 + 400)) && break
done
@@ -74,7 +74,7 @@ done
kilobytes=$((3 * 8*1024 - 50))
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = $((3 * 8*1024 + 500)) && break
done
@@ -83,7 +83,7 @@ done
kilobytes=$((4 * 8*1024 - 50))
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = $((4 * 8*1024 + 600)) && break
done
@@ -92,7 +92,7 @@ done
kilobytes=$((5 * 8*1024 - 50))
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = $((5 * 8*1024 + 700)) && break
done
exit