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: 037~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee4b74fb9cca356c6620ca0e4de2e917ce7ea6f0;p=thirdparty%2Fdracut.git Do not wait_for_dev if hostonly_cmdline not set --- diff --git a/dracut.sh b/dracut.sh index 79c59d565..c1ef4745c 100755 --- 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. diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh index d4dbca974..13fbee2a6 100755 --- a/modules.d/99base/module-setup.sh +++ b/modules.d/99base/module-setup.sh @@ -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 }