Skip to content

Commit

Permalink
fix(dracut.sh): omit compressed kernel modules from find searching ex…
Browse files Browse the repository at this point in the history
…ec files

Although the kernel modules are not included yet because they are not
executable, this speeds up the `find`.
  • Loading branch information
aafeijoo-suse authored and LaszloGombos committed Apr 6, 2024
1 parent c1275d8 commit ad36b61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ if [[ $kernel_only != yes ]]; then
if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
dinfo "*** Resolving executable dependencies ***"
# shellcheck disable=SC2086
find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \
find "$initdir" -type f -perm /0111 -not -path '*.ko*' -print0 \
| xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${dracutsysrootdir:+-r "$dracutsysrootdir"} -R ${DRACUT_FIPS_MODE:+-f} --
# shellcheck disable=SC2181
if (($? == 0)); then
Expand Down Expand Up @@ -2255,7 +2255,7 @@ if [[ $do_strip == yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
[[ -n $enhanced_cpio ]] && ddebug "strip is enabled alongside cpio reflink"
dinfo "*** Stripping files ***"
find "$initdir" -type f \
-executable -not -path '*/lib/modules/*.ko' -print0 \
-executable -not -path '*/lib/modules/*.ko*' -print0 \
| xargs -r -0 $strip_cmd "${strip_args[@]}" 2> /dev/null
# strip kernel modules, but do not touch signed modules
Expand Down

0 comments on commit ad36b61

Please sign in to comment.