aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-11-15 00:57:58 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-11-15 02:24:37 +0100
commitfb2a687bba457e5408bc3bd979568c9a18c51be5 (patch)
treef0cfb3284e9d4c2a7104c90b9fb8db30890df943
parentgen_initramfs.sh: append_busybox: NSS dns module was merged into libc in >=gl... (diff)
downloadgenkernel-fb2a687bba457e5408bc3bd979568c9a18c51be5.tar.gz
genkernel-fb2a687bba457e5408bc3bd979568c9a18c51be5.tar.bz2
genkernel-fb2a687bba457e5408bc3bd979568c9a18c51be5.zip
gen_initramfs.sh: append_dropbear: NSS files module was merged into libc in >=glibc-2.34
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-xgen_initramfs.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index fef8046c..4ec296ef 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -1601,8 +1601,16 @@ append_dropbear() {
if isTrue "$(is_glibc)"
then
local libdir=$(get_chost_libdir)
- mkdir -p "${TDIR}"/lib || gen_die "Failed to create '${TDIR}/lib'!"
- copy_system_binaries "${TDIR}"/lib "${libdir}"/libnss_files.so
+ local libnss_files="${libdir}/libnss_files.so"
+
+ # NSS files module was moved into libc in >=glibc-2.34
+ # but when this file exists we are probably dealing with older glibc
+ # and need to manually copy the module.
+ if [[ -f "${libnss_files}" ]]
+ then
+ mkdir -p "${TDIR}"/lib || gen_die "Failed to create '${TDIR}/lib'!"
+ copy_system_binaries "${TDIR}"/lib "${libnss_files}"
+ fi
fi
cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!"