]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95iscsi: fix "root=iscsi:...." case
authorHarald Hoyer <harald@redhat.com>
Thu, 16 Feb 2012 10:34:37 +0000 (11:34 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 16 Feb 2012 10:34:37 +0000 (11:34 +0100)
install udev rules and wait for /dev/root

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

index d8f7c8fc274323abc4d752ef3b1d05b4b1cadc34..7b8f63e7bbee88a2879b1fd039a9f8ce2bc012a9 100755 (executable)
@@ -46,6 +46,7 @@ if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then
     if [ -n "${root%%block:*}" ]; then
         # if root is not specified try to mount the whole iSCSI LUN
         printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
+        udevadm control --reload
     fi
     iscsistart -b
     exit 0
index 40720e8947449035879a998c6017969261e81608..64aae84222dd471cb5aa8358e852e5af132a895b 100755 (executable)
 if [ "${root%%:*}" = "iscsi" ] ; then
     if [ -n "$netroot" ] ; then
         echo "Warning: root takes precedence over netroot. Ignoring netroot"
-
     fi
     netroot=$root
+    # if root is not specified try to mount the whole iSCSI LUN
+    printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
+    root=/dev/root
 fi
 
 # If it's not empty or iscsi we don't continue