The postinstall phase in 99squash-lib can fail, e.g. when 99squash-lib
is added without one of the required back ends. Usually this isn't fatal
and simply results in a "normal" initrd, i.e. one without squashed
image, being created. Nevertheless, a user needs to explicitly add one
of the required modules for the code to be triggered. So it is better
to fail with an error rather than giving the user something he didn't
ask for.
Signed-off-by: Philipp Rudo <prudo@redhat.com>
if dracut_module_included "squash-lib"; then
dinfo "*** Squashing the files inside the initramfs ***"
- DRACUT_SQUASH_POST_INST=1 module_install "squash-lib"
+ DRACUT_SQUASH_POST_INST=1 module_install "squash-lib" || exit 1
rm -rf "$squashdir"
dinfo "*** Squashing the files inside the initramfs done ***"