-H, --hostonly Host-Only mode: Install only what is needed for
booting the local host instead of a generic host.
-N, --no-hostonly Disables Host-Only mode
+ --hostonly-cmdline Store kernel command line arguments needed
+ in the initramfs
+ --no-hostonly-cmdline Do not store kernel command line arguments needed
+ in the initramfs
--persistent-policy [POLICY]
Use [POLICY] to address disks and partitions.
POLICY can be any directory name found in /dev/disk.
-a|--add) push add_dracutmodules_l "$2"; shift;;
--force-add) push force_add_dracutmodules_l "$2"; shift;;
--add-drivers) push add_drivers_l "$2"; shift;;
- --omit-drivers) push omit_drivers_l "$2"; shift;;
+ --omit-drivers)
+ push omit_drivers_l "$2"; shift;;
-m|--modules) push dracutmodules_l "$2"; shift;;
-o|--omit) push omit_dracutmodules_l "$2"; shift;;
-d|--drivers) push drivers_l "$2"; shift;;
--mount) push fstab_lines "$2"; shift;;
--add-device|--device)
push add_device_l "$2"; shift;;
- --kernel-cmdline) push kernel_cmdline_l "$2"; shift;;
+ --kernel-cmdline)
+ push kernel_cmdline_l "$2"; shift;;
--nofscks) nofscks_l="yes";;
--ro-mnt) ro_mnt_l="yes";;
-k|--kmoddir) drivers_dir_l="$2"; shift;;
-f|--force) force=yes;;
--kernel-only) kernel_only="yes"; no_kernel="no";;
--no-kernel) kernel_only="no"; no_kernel="yes";;
- --print-cmdline) print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";;
- --early-microcode) early_microcode_l="yes";;
- --no-early-microcode) early_microcode_l="no";;
+ --print-cmdline)
+ print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";;
+ --early-microcode)
+ early_microcode_l="yes";;
+ --no-early-microcode)
+ early_microcode_l="no";;
--strip) do_strip_l="yes";;
--nostrip) do_strip_l="no";;
--prelink) do_prelink_l="yes";;
hostonly_l="yes" ;;
-N|--no-hostonly|--no-host-only)
hostonly_l="no" ;;
+ --hostonly-cmdline)
+ hostonly_cmdline_l="yes" ;;
+ --no-hostonly-cmdline)
+ hostonly_cmdline_l="no" ;;
--persistent-policy)
persistent_policy_l="$2"; shift;;
--fstab) use_fstab_l="yes" ;;
-h|--help) long_usage; exit 1 ;;
- -i|--include) push include_src "$2"
+ -i|--include)
+ push include_src "$2"
shift;;
--bzip2) compress_l="bzip2";;
--lzma) compress_l="lzma";;
[[ $prefix_l ]] && prefix=$prefix_l
[[ $prefix = "/" ]] && unset prefix
[[ $hostonly_l ]] && hostonly=$hostonly_l
+[[ $hostonly_cmdline_l ]] && hostonly_cmdline=$hostonly_cmdline_l
[[ $persistent_policy_l ]] && persistent_policy=$persistent_policy_l
[[ $use_fstab_l ]] && use_fstab=$use_fstab_l
[[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
echo fs-lib
}
-cmdline() {
- local dev=/dev/block/$(find_root_block_device)
- if [ -e $dev ]; then
- printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
- printf " rootflags=%s" "$(find_mp_fsopts /)"
- printf " rootfstype=%s" "$(find_mp_fstype /)"
- fi
-}
-
-install() {
+cmdline_journal() {
if [[ $hostonly ]]; then
for dev in "${!host_fs_types[@]}"; do
[[ ${host_fs_types[$dev]} = "reiserfs" ]] || [[ ${host_fs_types[$dev]} = "xfs" ]] || continue
fi
if [ -n "$journaldev" ]; then
- printf "%s\n" "root.journaldev=$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
+ printf " root.journaldev=%s" "$journaldev"
fi
done
fi
+ return 0
+}
+
+cmdline() {
+ local dev=/dev/block/$(find_root_block_device)
+ if [ -e $dev ]; then
+ printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
+ printf " rootflags=%s" "$(find_mp_fsopts /)"
+ printf " rootfstype=%s" "$(find_mp_fstype /)"
+ fi
+ cmdline_journal
+}
+
+install() {
+ if [[ $hostonly_cmdline == "yes" ]]; then
+ journaldev=$(cmdline_journal)
+ [[ $journaldev ]] && printf "%s\n" "$journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf"
+ fi
inst_multiple umount
inst_multiple tr