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; }
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"
kilobytes=60
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = 200 && break
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
kilobytes=$((2 * 8*1024 - 50))
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = $((2 * 8*1024 + 400)) && break
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
kilobytes=$((4 * 8*1024 - 50))
while true; do
test_mke2fs || exit 1
- : $((kilobytes++))
+ kilobytes=$((kilobytes+1))
test $kilobytes = $((4 * 8*1024 + 600)) && break
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