fix more instances of ": $((a++))" in shell scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
ed2b922537
commit
08dfafc437
@ -14,7 +14,7 @@ env | sort
|
|||||||
|
|
||||||
while sleep 1; test $cnt != 0; do
|
while sleep 1; test $cnt != 0; do
|
||||||
echo "Trying to reread partition table on $DEVNAME ($cnt)"
|
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.
|
# If device node doesn't exist, it means the device was removed.
|
||||||
# Stop trying.
|
# Stop trying.
|
||||||
test -e "$DEVNAME" || { echo "$DEVNAME doesn't exist, aborting"; exit 1; }
|
test -e "$DEVNAME" || { echo "$DEVNAME doesn't exist, aborting"; exit 1; }
|
||||||
|
@ -30,7 +30,7 @@ test x"$router" != x"" || exec env - sleep "$ping_time"
|
|||||||
failcnt=0
|
failcnt=0
|
||||||
while true; do
|
while true; do
|
||||||
ping $ping_opts "$router" && exec env - sleep "$ping_time"
|
ping $ping_opts "$router" && exec env - sleep "$ping_time"
|
||||||
: $((failcnt++))
|
failcnt=$((failcnt+1))
|
||||||
msg "Failed to ping $router, fail count:$failcnt"
|
msg "Failed to ping $router, fail count:$failcnt"
|
||||||
test $failcnt -ge $max_fail && break
|
test $failcnt -ge $max_fail && break
|
||||||
env - sleep "$retry_time"
|
env - sleep "$retry_time"
|
||||||
|
@ -47,7 +47,7 @@ test_mke2fs() {
|
|||||||
kilobytes=60
|
kilobytes=60
|
||||||
while true; do
|
while true; do
|
||||||
test_mke2fs || exit 1
|
test_mke2fs || exit 1
|
||||||
: $((kilobytes++))
|
kilobytes=$((kilobytes+1))
|
||||||
test $kilobytes = 200 && break
|
test $kilobytes = 200 && break
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ done
|
|||||||
kilobytes=$((1 * 8*1024 - 50))
|
kilobytes=$((1 * 8*1024 - 50))
|
||||||
while true; do
|
while true; do
|
||||||
test_mke2fs || exit 1
|
test_mke2fs || exit 1
|
||||||
: $((kilobytes++))
|
kilobytes=$((kilobytes+1))
|
||||||
test $kilobytes = $((1 * 8*1024 + 300)) && break
|
test $kilobytes = $((1 * 8*1024 + 300)) && break
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ done
|
|||||||
kilobytes=$((2 * 8*1024 - 50))
|
kilobytes=$((2 * 8*1024 - 50))
|
||||||
while true; do
|
while true; do
|
||||||
test_mke2fs || exit 1
|
test_mke2fs || exit 1
|
||||||
: $((kilobytes++))
|
kilobytes=$((kilobytes+1))
|
||||||
test $kilobytes = $((2 * 8*1024 + 400)) && break
|
test $kilobytes = $((2 * 8*1024 + 400)) && break
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ done
|
|||||||
kilobytes=$((3 * 8*1024 - 50))
|
kilobytes=$((3 * 8*1024 - 50))
|
||||||
while true; do
|
while true; do
|
||||||
test_mke2fs || exit 1
|
test_mke2fs || exit 1
|
||||||
: $((kilobytes++))
|
kilobytes=$((kilobytes+1))
|
||||||
test $kilobytes = $((3 * 8*1024 + 500)) && break
|
test $kilobytes = $((3 * 8*1024 + 500)) && break
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ done
|
|||||||
kilobytes=$((4 * 8*1024 - 50))
|
kilobytes=$((4 * 8*1024 - 50))
|
||||||
while true; do
|
while true; do
|
||||||
test_mke2fs || exit 1
|
test_mke2fs || exit 1
|
||||||
: $((kilobytes++))
|
kilobytes=$((kilobytes+1))
|
||||||
test $kilobytes = $((4 * 8*1024 + 600)) && break
|
test $kilobytes = $((4 * 8*1024 + 600)) && break
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ done
|
|||||||
kilobytes=$((5 * 8*1024 - 50))
|
kilobytes=$((5 * 8*1024 - 50))
|
||||||
while true; do
|
while true; do
|
||||||
test_mke2fs || exit 1
|
test_mke2fs || exit 1
|
||||||
: $((kilobytes++))
|
kilobytes=$((kilobytes+1))
|
||||||
test $kilobytes = $((5 * 8*1024 + 700)) && break
|
test $kilobytes = $((5 * 8*1024 + 700)) && break
|
||||||
done
|
done
|
||||||
exit
|
exit
|
||||||
|
Loading…
Reference in New Issue
Block a user