Harald Hoyer 87cf60
From e5d60187837a0a6d80f719fd6e9238adcc3ebbb9 Mon Sep 17 00:00:00 2001
Harald Hoyer 87cf60
From: Harald Hoyer <harald@hoyer.xyz>
Harald Hoyer 87cf60
Date: Wed, 16 Aug 2017 10:16:55 +0200
Harald Hoyer 87cf60
Subject: [PATCH] Merge pull request #268 from danimo/ssh_include_nss
Harald Hoyer 87cf60
Harald Hoyer 87cf60
ssh-client: Include nss_ libraries
Harald Hoyer 87cf60
---
Harald Hoyer 87cf60
 modules.d/95ssh-client/module-setup.sh | 9 +++++++++
Harald Hoyer 87cf60
 1 file changed, 9 insertions(+)
Harald Hoyer 87cf60
Harald Hoyer 87cf60
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
Harald Hoyer 87cf60
index 2a7e0ee3..672de502 100755
Harald Hoyer 87cf60
--- a/modules.d/95ssh-client/module-setup.sh
Harald Hoyer 87cf60
+++ b/modules.d/95ssh-client/module-setup.sh
Harald Hoyer 87cf60
@@ -63,7 +63,16 @@ inst_sshenv()
Harald Hoyer 87cf60
 
Harald Hoyer 87cf60
 # called by dracut
Harald Hoyer 87cf60
 install() {
Harald Hoyer 87cf60
+    local _nsslibs
Harald Hoyer 87cf60
+
Harald Hoyer 87cf60
     inst_multiple ssh scp
Harald Hoyer 87cf60
     inst_sshenv
Harald Hoyer 87cf60
+
Harald Hoyer 87cf60
+    _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
Harald Hoyer 87cf60
+        |  tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
Harald Hoyer 87cf60
+    _nsslibs=${_nsslibs#|}
Harald Hoyer 87cf60
+    _nsslibs=${_nsslibs%|}
Harald Hoyer 87cf60
+
Harald Hoyer 87cf60
+    inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
Harald Hoyer 87cf60
 }
Harald Hoyer 87cf60
 
Harald Hoyer 87cf60