From: Hannes Reinecke <[email protected]>

The bad initqueue parameter passing is already addressed by git commit:
commit bb8c16d12178373f17553294603ff5187e318b51
and
commit 486a8f33e2edaf249e3a09c98a910094e201cf9e

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 <[email protected]>
Signed-off-by: Thomas Renninger <[email protected]>
---
 modules.d/95iscsi/parse-iscsiroot.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules.d/95iscsi/parse-iscsiroot.sh 
b/modules.d/95iscsi/parse-iscsiroot.sh
index 85c3027..37e46ad 100755
--- a/modules.d/95iscsi/parse-iscsiroot.sh
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
@@ -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
 
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to