--omit-drivers --modules --omit --drivers --filesystems --install
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
- --kernel-cmdline --sshkey --persistent-policy'
+ --kernel-cmdline --sshkey --persistent-policy --install-optional'
)
if __contains_word "$prev" ${OPTS[ARG]}; then
comps=$(compgen -d -- "$cur")
compopt -o filenames
;;
- -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install)
+ -c|--conf|--sshkey|--add-fstab|--add-device|-I|--install|--install-optional)
comps=$(compgen -f -- "$cur")
compopt -o filenames
;;
----
===============================
+**--install-optional** _<file list>_::
+ install the space separated list of files into the initramfs, if they exist.
+
**--gzip**::
Compress the generated initramfs using gzip. This will be done by default,
unless another compression option or --no-compress is passed. Equivalent to
*install_items+=*" __<file>__[ __<file>__ ...] "::
Specify additional files to include in the initramfs, separated by spaces.
+*install_optional_items+=*" __<file>__[ __<file>__ ...] "::
+ Specify additional files to include in the initramfs, separated by spaces,
+ if they exist.
+
*do_strip=*"__{yes|no}__"::
Strip binaries in the initramfs (default=yes)
in the final initramfs.
-I, --install [LIST] Install the space separated list of files into the
initramfs.
+ --install-optional [LIST] Install the space separated list of files into the
+ initramfs, if they exist.
--gzip Compress the generated initramfs using gzip.
This will be done by default, unless another
compression option or --no-compress is passed.
--long drivers: \
--long filesystems: \
--long install: \
+ --long install-optional: \
--long fwdir: \
--long libdirs: \
--long fscks: \
-d|--drivers) push drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--filesystems) push filesystems_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-I|--install) push install_items_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
+ --install-optional)
+ push install_optional_items_l \
+ "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--fwdir) push fw_dir_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--libdirs) push libdirs_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--fscks) push fscks_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
done
fi
+if (( ${#install_optional_items_l[@]} )); then
+ while pop install_optional_items_l val; do
+ install_optional_items+=" $val "
+ done
+fi
+
# these options override the stuff in the config file
if (( ${#dracutmodules_l[@]} )); then
dracutmodules=''
if [[ $kernel_only != yes ]]; then
(( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]}
+ (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]}
[[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf"