Blame SOURCES/0146-Do-not-wait_for_dev-if-hostonly_cmdline-not-set.patch

18971c
From 84c66ac857b3cb6f5fa3ba597d298350753d79bf Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Thu, 6 Mar 2014 09:54:36 +0100
18971c
Subject: [PATCH] Do not wait_for_dev if hostonly_cmdline not set
18971c
18971c
---
18971c
 dracut.sh                        |  2 +-
18971c
 modules.d/99base/module-setup.sh | 40 +++++++++++++++++---------------
18971c
 2 files changed, 22 insertions(+), 20 deletions(-)
18971c
18971c
diff --git a/dracut.sh b/dracut.sh
18971c
index 78d7fadd..95f18dbf 100755
18971c
--- a/dracut.sh
18971c
+++ b/dracut.sh
18971c
@@ -1076,7 +1076,7 @@ export initdir dracutbasedir dracutmodules \
18971c
     debug host_fs_types host_devs sshkey add_fstab \
18971c
     DRACUT_VERSION udevdir prefix filesystems drivers \
18971c
     systemdutildir systemdsystemunitdir systemdsystemconfdir \
18971c
-    host_modalias host_modules
18971c
+    host_modalias host_modules hostonly_cmdline
18971c
 
18971c
 mods_to_load=""
18971c
 # check all our modules to see if they should be sourced.
18971c
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
18971c
index 52ce4004..fddf4b06 100755
18971c
--- a/modules.d/99base/module-setup.sh
18971c
+++ b/modules.d/99base/module-setup.sh
18971c
@@ -92,24 +92,26 @@ install() {
18971c
     ln -sf initrd-release $initdir/etc/os-release
18971c
 
18971c
     ## save host_devs which we need bring up
18971c
-    if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
18971c
-        (
18971c
-            if dracut_module_included "systemd"; then
18971c
-                DRACUT_SYSTEMD=1
18971c
-            fi
18971c
-            PREFIX="$initdir"
18971c
-
18971c
-            . "$moddir/dracut-lib.sh"
18971c
-
18971c
-            for _dev in ${host_devs[@]}; do
18971c
-                [[ "$_dev" == "$root_dev" ]] && continue
18971c
-                _pdev=$(get_persistent_dev $_dev)
18971c
-
18971c
-                case "$_pdev" in
18971c
-                    /dev/?*) wait_for_dev $_pdev;;
18971c
-                    *) ;;
18971c
-                esac
18971c
-            done
18971c
-        )
18971c
+    if [[ $hostonly_cmdline == "yes" ]]; then
18971c
+        if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
18971c
+            (
18971c
+                if dracut_module_included "systemd"; then
18971c
+                    DRACUT_SYSTEMD=1
18971c
+                fi
18971c
+                PREFIX="$initdir"
18971c
+
18971c
+                . "$moddir/dracut-lib.sh"
18971c
+
18971c
+                for _dev in ${host_devs[@]}; do
18971c
+                    [[ "$_dev" == "$root_dev" ]] && continue
18971c
+                    _pdev=$(get_persistent_dev $_dev)
18971c
+
18971c
+                    case "$_pdev" in
18971c
+                        /dev/?*) wait_for_dev $_pdev;;
18971c
+                        *) ;;
18971c
+                    esac
18971c
+                done
18971c
+            )
18971c
+        fi
18971c
     fi
18971c
 }