]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
swap for loop to POSIX shell compat
authorNathan Rini <nate@ucar.edu>
Tue, 9 Oct 2018 15:40:43 +0000 (09:40 -0600)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 25 Oct 2019 09:37:43 +0000 (11:37 +0200)
modules.d/90livenet/livenetroot.sh

index 305a6c25a9d52c83983919418385e4b11134e584..1f58c55ea54455a8ba0eb66ca1ab54ace353e63b 100755 (executable)
@@ -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?