dracut/dracut-044-bash-4.4.patch

14 lines
557 B
Diff
Raw Permalink Normal View History

diff --git a/dracut.sh b/dracut.sh
index 98dbe0b..2b583de 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1595,7 +1595,7 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
# strip kernel modules, but do not touch signed modules
find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \
| while read -r -d $'\0' f || [ -n "$f" ]; do
- SIG=$(tail -c 28 "$f")
+ SIG=$(tail -c 28 "$f" | tr -d '\000')
[[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; }
done | xargs -r -0 strip -g