]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
iscsiroot: check real root if it is block:...
authorHarald Hoyer <harald@redhat.com>
Fri, 31 Jul 2009 11:56:55 +0000 (13:56 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 31 Jul 2009 12:43:14 +0000 (14:43 +0200)
modules.d/95iscsi/iscsiroot

index e28cbaa7a1d5f12a679f7add0344e09c7099f77b..b880c2d10a44df525d09251a5edcaeca7aff6738 100755 (executable)
@@ -28,17 +28,22 @@ fi
 
 # root is in the form root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname>
 netif="$1"
-root="$2"
+iroot="$2"
 
 source_all /etc/conf.d
 
 # If it's not iscsi we don't continue
-[ "${root%%:*}" = "iscsi" ] || exit 1
+[ "${iroot%%:*}" = "iscsi" ] || exit 1
+
+iroot=${iroot#iscsi:}
 
 # XXX modprobe crc32c should go in the cmdline parser, but I haven't yet
 # figured out a way how to check whether this is built-in or not
 modprobe crc32c
 
+
+[ -e /tmp/root.info ] && . /tmp/root.info
+
 if getarg iscsi_firmware ; then
     if [ -n "${root%%block:*}" ]; then
         # if root is not specified try to mount the whole iSCSI LUN
@@ -68,12 +73,6 @@ arg=$(getarg iscsi_in_username)
 arg=$(getarg iscsi_in_password)
 [ -n "$arg" ] && iscsi_in_password=$arg
 
-if [ $root = ${root#iscsi:} ]; then
-       iroot=$(getarg iscsiroot)
-else
-       iroot=${root#iscsi:}
-fi
-
 # override conf/commandline options by dhcp root_path
 # FIXME this assumes that all values have been provided
 OLDIFS="$IFS"