From: Nathan Rini Date: Tue, 9 Oct 2018 15:40:43 +0000 (-0600) Subject: swap for loop to POSIX shell compat X-Git-Tag: 050~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=916ac45cbef5886d9b3ddfe6501604d8289af851;p=thirdparty%2Fdracut.git swap for loop to POSIX shell compat --- diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh index 305a6c25a..1f58c55ea 100755 --- a/modules.d/90livenet/livenetroot.sh +++ b/modules.d/90livenet/livenetroot.sh @@ -18,7 +18,8 @@ info "fetching $liveurl" imgfile= #retry until the imgfile is populated with data or the max retries -for (( i=1; i<=$RETRIES; i++)) +i=1 +while [ "$i" -le $RETRIES ] do imgfile=$(fetch_url "$liveurl") @@ -37,6 +38,8 @@ do sleep $SLEEP fi + + i=$((i + 1)) done > /tmp/livenet.downloaded # TODO: couldn't dmsquash-live-root handle this?