aboutsummaryrefslogtreecommitdiff
path: root/examples
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 /examples
parented2b9225371a36dd2694df65e395dc32fd94c5dd (diff)
downloadbusybox-w32-08dfafc43757c42971b4bc3709ae7a5cda7c21fb.tar.gz
busybox-w32-08dfafc43757c42971b4bc3709ae7a5cda7c21fb.tar.bz2
busybox-w32-08dfafc43757c42971b4bc3709ae7a5cda7c21fb.zip
fix more instances of ": $((a++))" in shell scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/mdev.conf.change_blockdev.sh2
-rwxr-xr-xexamples/var_service/dhcp_if_pinger/run2
2 files changed, 2 insertions, 2 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
15while sleep 1; test $cnt != 0; do 15while 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"
30failcnt=0 30failcnt=0
31while true; do 31while 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"