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
master
Michal Koutný 2017-08-15 15:25:18 +02:00 committed by Daniel Molkentin
parent 3bd3ef5819
commit 348935e3b6
1 changed files with 9 additions and 0 deletions

View File

@ -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*'
}