Skip to content

Commit

Permalink
fix(squash): post install should be the last step before stripping
Browse files Browse the repository at this point in the history
Ensure dracut squash module doesn't effect other steps, and stripping
can cover the new binaries installed by it.
  • Loading branch information
ryncsn authored and johannbg committed Mar 9, 2021
1 parent 95ea16a commit 8c8aecd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 8c8aecd

Please sign in to comment.