commit: fb2a687bba457e5408bc3bd979568c9a18c51be5
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 14 23:57:58 2021 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 01:24:37 2021 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=fb2a687b
gen_initramfs.sh: append_dropbear: NSS files module was merged into libc in
>=glibc-2.34
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
gen_initramfs.sh | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index fef8046..4ec296e 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}'!"