aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
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
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"