mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
Check for the kconfig in /lib/modules/ too
Supporting kernel packages shipping files in /lib/ instead of /boot.
This commit is contained in:
parent
dd16eade69
commit
90addd04bc
@ -179,6 +179,12 @@ if ! command -v "${compress}" >/dev/null 2>&1; then
|
||||
compress=gzip
|
||||
fi
|
||||
|
||||
# Support packages installing in /lib/ rather than /boot/
|
||||
kconfig="/lib/modules/${version}/config-${version}"
|
||||
if [ ! -f "$kconfig" ]; then
|
||||
kconfig="/boot/config-${version}"
|
||||
fi
|
||||
|
||||
# Check that kernel supports selected compressor, and fall back to gzip.
|
||||
# Exit if even gzip is not supported.
|
||||
case "${compress}" in
|
||||
@ -190,7 +196,7 @@ lzop) kconfig_sym=CONFIG_RD_LZO ;;
|
||||
lz4) kconfig_sym=CONFIG_RD_LZ4 ;;
|
||||
zstd) kconfig_sym=CONFIG_RD_ZSTD ;;
|
||||
esac
|
||||
while ! grep -q "^$kconfig_sym=y" "/boot/config-${version}"; do
|
||||
while ! grep -q "^$kconfig_sym=y" "${kconfig}"; do
|
||||
if [ "${compress}" = gzip ]; then
|
||||
echo "E: gzip compression ($kconfig_sym) not supported by kernel" >&2
|
||||
exit 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user