]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
iscsi/parse-iscsiroot.sh: correct handling if netroot isn't set
authorHarald Hoyer <harald@redhat.com>
Thu, 17 Sep 2015 13:41:12 +0000 (15:41 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 17 Sep 2015 13:41:12 +0000 (15:41 +0200)
corrects bfe65f913a4bc6bc5fdb7aa75234c229a2ceef8f

modules.d/95iscsi/parse-iscsiroot.sh

index f19147f6f7596c19fd5d39adde230ab3db5a8fd3..3d74ff2e3e7209345c1fec308bb437ba50286e07 100755 (executable)
@@ -84,7 +84,9 @@ if [ -n "$iscsi_firmware" ]; then
     initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'"
 fi
 
-[ -z "$netroot" ] || [ "${netroot%%:*}" = "iscsi" ] || return 1
+if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then
+    return 1
+fi
 
 initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT"