]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Do not wait_for_dev if hostonly_cmdline not set
authorHarald Hoyer <harald@redhat.com>
Thu, 6 Mar 2014 08:54:36 +0000 (09:54 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 6 Mar 2014 08:55:19 +0000 (09:55 +0100)
dracut.sh
modules.d/99base/module-setup.sh

index 79c59d5651867d3f5e0db82c6633862b43d4e345..c1ef4745c6e311d64aae458dd73f9130281a5e90 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1152,7 +1152,7 @@ export initdir dracutbasedir dracutmodules \
     debug host_fs_types host_devs sshkey add_fstab \
     DRACUT_VERSION udevdir prefix filesystems drivers \
     systemdutildir systemdsystemunitdir systemdsystemconfdir \
-    host_modalias host_modules
+    host_modalias host_modules hostonly_cmdline
 
 mods_to_load=""
 # check all our modules to see if they should be sourced.
index d4dbca974245ef287247bc46b4680504cd2d26c8..13fbee2a6e284fb1cd9139c746e0596eb3cce94f 100755 (executable)
@@ -95,24 +95,26 @@ install() {
     ln -sf initrd-release $initdir/etc/os-release
 
     ## save host_devs which we need bring up
-    if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
-        (
-            if dracut_module_included "systemd"; then
-                DRACUT_SYSTEMD=1
-            fi
-            PREFIX="$initdir"
-
-            . "$moddir/dracut-lib.sh"
-
-            for _dev in ${host_devs[@]}; do
-                [[ "$_dev" == "$root_dev" ]] && continue
-                _pdev=$(get_persistent_dev $_dev)
-
-                case "$_pdev" in
-                    /dev/?*) wait_for_dev $_pdev;;
-                    *) ;;
-                esac
-            done
-        )
+    if [[ $hostonly_cmdline == "yes" ]]; then
+        if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
+            (
+                if dracut_module_included "systemd"; then
+                    DRACUT_SYSTEMD=1
+                fi
+                PREFIX="$initdir"
+
+                . "$moddir/dracut-lib.sh"
+
+                for _dev in ${host_devs[@]}; do
+                    [[ "$_dev" == "$root_dev" ]] && continue
+                    _pdev=$(get_persistent_dev $_dev)
+
+                    case "$_pdev" in
+                        /dev/?*) wait_for_dev $_pdev;;
+                        *) ;;
+                    esac
+                done
+            )
+        fi
     fi
 }