diff --git a/dracut.sh b/dracut.sh index 137df3387..18033a197 100755 --- a/dracut.sh +++ b/dracut.sh @@ -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 @@ -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