]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(squash): post install should be the last step before stripping
authorKairui Song <kasong@redhat.com>
Wed, 10 Feb 2021 16:39:17 +0000 (00:39 +0800)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Tue, 9 Mar 2021 13:40:35 +0000 (13:40 +0000)
Ensure dracut squash module doesn't effect other steps, and stripping
can cover the new binaries installed by it.

dracut.sh

index ca9907ae19ade7239ea1cc6c519e08ae6d776ff2..184e4769c10ad39b4e05e94cf64e2d9cc4f79994 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -2019,14 +2019,6 @@ if [[ $hostonly_cmdline == "yes" ]] ; then
     fi
 fi
 
-if dracut_module_included "squash"; then
-    readonly squash_dir="$initdir/squash/root"
-    readonly squash_img="$initdir/squash/root.img"
-
-    dinfo "*** Install squash loader ***"
-    DRACUT_SQUASH_POST_INST=1 module_install "squash"
-fi
-
 if [[ $kernel_only != yes ]]; then
     # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so
     for _dir in $libdirs; do
@@ -2063,6 +2055,14 @@ if [[ $kernel_only != yes ]]; then
     fi
 fi
 
+if dracut_module_included "squash"; then
+    readonly squash_dir="$initdir/squash/root"
+    readonly squash_img="$initdir/squash/root.img"
+
+    dinfo "*** Install squash loader ***"
+    DRACUT_SQUASH_POST_INST=1 module_install "squash"
+fi
+
 if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
     dinfo "*** Stripping files ***"
     find "$initdir" -type f \