d6c4ca2157
Additional fix to avoid regression: https://github.com/dracut-ng/dracut-ng/pull/590#issuecomment-2301382666 From-source-git-commit: fa245cea3b5f03d24777e9cbf6f295977541565c
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From 8fe64408bd8349e28b7257f93880527a93c63fa2 Mon Sep 17 00:00:00 2001
|
|
From: Philipp Rudo <prudo@redhat.com>
|
|
Date: Tue, 27 Aug 2024 12:14:40 +0200
|
|
Subject: [PATCH 34/35] fix(dracut.sh): exit when installing the squash loader
|
|
fails
|
|
|
|
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>
|
|
(cherry picked from commit 8909d892a7a055ae95be45416e6fbf1b833ff426)
|
|
|
|
Resolves: RHEL-43460
|
|
---
|
|
dracut.sh | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/dracut.sh b/dracut.sh
|
|
index 71568fe0..3d73fe43 100755
|
|
--- a/dracut.sh
|
|
+++ b/dracut.sh
|
|
@@ -2278,7 +2278,7 @@ fi
|
|
|
|
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 ***"
|
|
|
|
--
|
|
2.42.0
|
|
|