iscsi/parse-iscsiroot.sh: correct handling if netroot isn't set

corrects bfe65f913a
Harald Hoyer 2015-09-17 15:41:12 +02:00
parent bcc2132dab
commit 7fd112f20e
1 changed files with 3 additions and 1 deletions

View File

@ -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"