From 84c66ac857b3cb6f5fa3ba597d298350753d79bf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 6 Mar 2014 09:54:36 +0100 Subject: [PATCH] Do not wait_for_dev if hostonly_cmdline not set --- dracut.sh | 2 +- modules.d/99base/module-setup.sh | 40 +++++++++++++++++--------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/dracut.sh b/dracut.sh index 78d7fadd..95f18dbf 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1076,7 +1076,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. diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh index 52ce4004..fddf4b06 100755 --- a/modules.d/99base/module-setup.sh +++ b/modules.d/99base/module-setup.sh @@ -92,24 +92,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 }