(($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" $_helper || :
}
+# Use with form hostonly="$(optional_hostonly)" inst_xxxx <args>
+# If hosotnly mode is set to "strict", hostonly restrictions will still
+# be applied, else will ignore hostonly mode and try to install all
+# given modules.
+optional_hostonly() {
+ if [[ $hostonly_mode = "strict" ]]; then
+ printf -- "$hostonly"
+ else
+ printf ""
+ fi
+}
+
mark_hostonly() {
for i in "$@"; do
echo "$i" >> "$initdir/lib/dracut/hostonly-files"
dracut_kernel_post() {
for _f in modules.builtin.bin modules.builtin modules.order; do
- [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f"
+ [[ -e $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f"
done
# generate module dependencies for the initrd
set -- "${args[@]}"
fi
+ if (($# == 0)); then
+ return 0
+ fi
+
$DRACUT_INSTALL \
${initdir:+-D "$initdir"} \
${loginstall:+-L "$loginstall"} \