From: Harald Hoyer Date: Thu, 6 Mar 2014 08:54:36 +0000 (+0100) Subject: Do not wait_for_dev if hostonly_cmdline not set X-Git-Tag: RHEL-7.1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84c66ac857b3cb6f5fa3ba597d298350753d79bf;p=thirdparty%2Fdracut.git Do not wait_for_dev if hostonly_cmdline not set --- diff --git a/dracut.sh b/dracut.sh index 78d7fadd3..95f18dbf3 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 52ce40042..fddf4b06b 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 }