From: Kairui Song Date: Wed, 10 Feb 2021 16:39:17 +0000 (+0800) Subject: fix(squash): post install should be the last step before stripping X-Git-Tag: 054~333 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c8aecdc63c9389038e78ee712d4809e49add5e1;p=thirdparty%2Fdracut.git fix(squash): post install should be the last step before stripping Ensure dracut squash module doesn't effect other steps, and stripping can cover the new binaries installed by it. --- diff --git a/dracut.sh b/dracut.sh index ca9907ae1..184e4769c 100755 --- 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 \