Let 99squash fail earlier if required modules are not enabled or
missing, using the new added helper.
Signed-off-by: Kairui Song <kasong@redhat.com>
if dracut_module_included "squash"; then
dinfo "*** Install squash loader ***"
- for config in \
- CONFIG_SQUASHFS \
- CONFIG_OVERLAY_FS \
- CONFIG_DEVTMPFS;
- do
- if ! check_kernel_config $config; then
- dfatal "$config have to be enabled for dracut squash module to work"
- exit 1
- fi
- done
-
readonly squash_dir="$initdir/squash/root"
readonly squash_img="$initdir/squash/root.img"
readonly squash_candidate=( "usr" "etc" )
return 1
fi
+ for i in squashfs loop overlay; do
+ if ! check_kernel_module $i; then
+ derror "dracut-squash module requires kernel module $i"
+ return 1
+ fi
+ done
+
return 255
}
}
installkernel() {
- hostonly="" instmods -c squashfs loop overlay
+ hostonly="" instmods squashfs loop overlay
}
install() {