95iscsi: strip one set of quotes when calling initqueue

The bad initqueue parameter passing is already addressed by git commit:
commit bb8c16d121
and
commit 486a8f33e2

However this appraoch is slightly different:
"$netroot" instead of "'$netroot'", etc.

initqueue will process the arguments, assuming the first non-option
argument to be the program to be executed. Putting the entire
commandline into this argument confuses both, initqueue and the
program in question.

References: bnc#879038

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
master
Hannes Reinecke 2014-12-11 15:46:00 +01:00 committed by Harald Hoyer
parent a3a2266046
commit 9ebf4a5d3c
1 changed files with 3 additions and 3 deletions

View File

@ -59,10 +59,10 @@ fi

# iscsi_firmware does not need argument checking
if [ -n "$iscsi_firmware" ] ; then
netroot=${netroot:-iscsi:}
[ -z "$netroot" ] && netroot=iscsi:
modprobe -q iscsi_boot_sysfs 2>/dev/null
modprobe -q iscsi_ibft
initqueue --onetime --timeout /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'"
initqueue --onetime --timeout /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
fi

# If it's not iscsi we don't continue
@ -86,7 +86,7 @@ fi

if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then
if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then
initqueue --onetime --settled /sbin/iscsiroot dummy "'$netroot'" "'$NEWROOT'"
initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
fi
fi