]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(livenet): propagate error code
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Fri, 19 Jan 2024 17:01:16 +0000 (18:01 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sat, 30 Mar 2024 11:31:55 +0000 (07:31 -0400)
modules.d/90livenet/livenetroot.sh

index 66dd41b39accded7ce699caea34822dea951232d..8a0c19f59aaf0d11cc9e64d6c740a03217b65e65 100755 (executable)
@@ -30,8 +30,9 @@ while [ "$i" -le "$RETRIES" ]; do
     imgfile=$(fetch_url "$liveurl")
 
     # shellcheck disable=SC2181
-    if [ $? != 0 ]; then
-        warn "failed to download live image: error $?"
+    ret=$?
+    if [ $ret != 0 ]; then
+        warn "failed to download live image: error $ret"
         imgfile=
     fi