From: Michal Koutný Date: Tue, 15 Aug 2017 13:25:18 +0000 (+0200) Subject: ssh-client: Include nss_ libraries X-Git-Tag: 047~108^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F268%2Fhead;p=thirdparty%2Fdracut.git ssh-client: Include nss_ libraries SSH uses passwd database and thus need various NSS plugin libraries, depending upon setting in nsswitch.conf. SSH binary fails within the dracut environment without the libraries: #:/ ssh No user exist for uid 0 --- diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh index 2a7e0ee37..672de5023 100755 --- a/modules.d/95ssh-client/module-setup.sh +++ b/modules.d/95ssh-client/module-setup.sh @@ -63,7 +63,16 @@ inst_sshenv() # called by dracut install() { + local _nsslibs + inst_multiple ssh scp inst_sshenv + + _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ + | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') + _nsslibs=${_nsslibs#|} + _nsslibs=${_nsslibs%|} + + inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' }