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