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.
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
}