diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-15 19:18:58 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-18 19:20:58 +0200 |
commit | 56a361bec15bdc3ee13b2208d43747298f281867 (patch) | |
tree | 68e43c02b9fc9b81d6e297c02d7ef70c03bca303 | |
parent | 6f13dd1d6574bbc0eacd5574d2e451596a92df5d (diff) | |
download | busybox-w32-56a361bec15bdc3ee13b2208d43747298f281867.tar.gz busybox-w32-56a361bec15bdc3ee13b2208d43747298f281867.tar.bz2 busybox-w32-56a361bec15bdc3ee13b2208d43747298f281867.zip |
fix more instances of ": $((a++))" in shell scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-x | examples/mdev.conf.change_blockdev.sh | 2 | ||||
-rwxr-xr-x | examples/var_service/dhcp_if_pinger/run | 2 | ||||
-rwxr-xr-x | util-linux/mkfs_ext2_test.sh | 12 |
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 | |||
14 | 14 | ||
15 | while sleep 1; test $cnt != 0; do | 15 | while sleep 1; test $cnt != 0; do |
16 | echo "Trying to reread partition table on $DEVNAME ($cnt)" | 16 | echo "Trying to reread partition table on $DEVNAME ($cnt)" |
17 | : $((cnt--)) | 17 | cnt=$((cnt-1)) |
18 | # If device node doesn't exist, it means the device was removed. | 18 | # If device node doesn't exist, it means the device was removed. |
19 | # Stop trying. | 19 | # Stop trying. |
20 | test -e "$DEVNAME" || { echo "$DEVNAME doesn't exist, aborting"; exit 1; } | 20 | 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" | |||
30 | failcnt=0 | 30 | failcnt=0 |
31 | while true; do | 31 | while true; do |
32 | ping $ping_opts "$router" && exec env - sleep "$ping_time" | 32 | ping $ping_opts "$router" && exec env - sleep "$ping_time" |
33 | : $((failcnt++)) | 33 | failcnt=$((failcnt+1)) |
34 | msg "Failed to ping $router, fail count:$failcnt" | 34 | msg "Failed to ping $router, fail count:$failcnt" |
35 | test $failcnt -ge $max_fail && break | 35 | test $failcnt -ge $max_fail && break |
36 | env - sleep "$retry_time" | 36 | 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() { | |||
47 | kilobytes=60 | 47 | kilobytes=60 |
48 | while true; do | 48 | while true; do |
49 | test_mke2fs || exit 1 | 49 | test_mke2fs || exit 1 |
50 | : $((kilobytes++)) | 50 | kilobytes=$((kilobytes+1)) |
51 | test $kilobytes = 200 && break | 51 | test $kilobytes = 200 && break |
52 | done | 52 | done |
53 | 53 | ||
@@ -56,7 +56,7 @@ done | |||
56 | kilobytes=$((1 * 8*1024 - 50)) | 56 | kilobytes=$((1 * 8*1024 - 50)) |
57 | while true; do | 57 | while true; do |
58 | test_mke2fs || exit 1 | 58 | test_mke2fs || exit 1 |
59 | : $((kilobytes++)) | 59 | kilobytes=$((kilobytes+1)) |
60 | test $kilobytes = $((1 * 8*1024 + 300)) && break | 60 | test $kilobytes = $((1 * 8*1024 + 300)) && break |
61 | done | 61 | done |
62 | 62 | ||
@@ -65,7 +65,7 @@ done | |||
65 | kilobytes=$((2 * 8*1024 - 50)) | 65 | kilobytes=$((2 * 8*1024 - 50)) |
66 | while true; do | 66 | while true; do |
67 | test_mke2fs || exit 1 | 67 | test_mke2fs || exit 1 |
68 | : $((kilobytes++)) | 68 | kilobytes=$((kilobytes+1)) |
69 | test $kilobytes = $((2 * 8*1024 + 400)) && break | 69 | test $kilobytes = $((2 * 8*1024 + 400)) && break |
70 | done | 70 | done |
71 | 71 | ||
@@ -74,7 +74,7 @@ done | |||
74 | kilobytes=$((3 * 8*1024 - 50)) | 74 | kilobytes=$((3 * 8*1024 - 50)) |
75 | while true; do | 75 | while true; do |
76 | test_mke2fs || exit 1 | 76 | test_mke2fs || exit 1 |
77 | : $((kilobytes++)) | 77 | kilobytes=$((kilobytes+1)) |
78 | test $kilobytes = $((3 * 8*1024 + 500)) && break | 78 | test $kilobytes = $((3 * 8*1024 + 500)) && break |
79 | done | 79 | done |
80 | 80 | ||
@@ -83,7 +83,7 @@ done | |||
83 | kilobytes=$((4 * 8*1024 - 50)) | 83 | kilobytes=$((4 * 8*1024 - 50)) |
84 | while true; do | 84 | while true; do |
85 | test_mke2fs || exit 1 | 85 | test_mke2fs || exit 1 |
86 | : $((kilobytes++)) | 86 | kilobytes=$((kilobytes+1)) |
87 | test $kilobytes = $((4 * 8*1024 + 600)) && break | 87 | test $kilobytes = $((4 * 8*1024 + 600)) && break |
88 | done | 88 | done |
89 | 89 | ||
@@ -92,7 +92,7 @@ done | |||
92 | kilobytes=$((5 * 8*1024 - 50)) | 92 | kilobytes=$((5 * 8*1024 - 50)) |
93 | while true; do | 93 | while true; do |
94 | test_mke2fs || exit 1 | 94 | test_mke2fs || exit 1 |
95 | : $((kilobytes++)) | 95 | kilobytes=$((kilobytes+1)) |
96 | test $kilobytes = $((5 * 8*1024 + 700)) && break | 96 | test $kilobytes = $((5 * 8*1024 + 700)) && break |
97 | done | 97 | done |
98 | exit | 98 | exit |