chiark / gitweb /
tests: install all required libnss modules
authorMartin Pitt <martin.pitt@ubuntu.com>
Sun, 1 Feb 2015 23:19:31 +0000 (00:19 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 3 Feb 2015 08:50:45 +0000 (09:50 +0100)
Don't assume "files" for everything in nsswitch. Instead, ask "getent passwd"
about which libnss modules it dlopen()s, and install these.

test/test-functions

index 42c954d5658fe18773c9fbe673d0c623ed461bc5..34af32a7982a443979b4eec064f392e01366a001 100644 (file)
@@ -241,7 +241,10 @@ install_debug_tools() {
 
 install_libnss() {
     # install libnss_files for login
-    inst_libdir_file "libnss_files*"
+    NSS_LIBS=$(LD_DEBUG=files getent passwd 2>&1 >/dev/null |sed -n '/calling init: .*libnss_/ {s!^.* /!/!; p}')
+    for l in $NSS_LIBS; do
+        dracut_install $l
+    done
 }
 
 install_dbus() {