quirks/nss.sh: fix nsswitch.conf

This commit is contained in:
Harald Hoyer 2018-09-18 19:01:40 +02:00
parent 77e345b251
commit 27fd0fd8f6

View file

@ -1,6 +1,9 @@
#!/usr/bin/bash -ex #!/usr/bin/bash -ex
sed -i -e 's#^\(passwd:.*\) files#\1 files db altfile#g;s#^\(shadow:.*\) files#\1 files altfiles db#g;s#^\(group:.*\) files#\1 files altfiles db#g' \ # rpcbind only accepts "files altfiles"
# altfiles has no shadow/gshadow support, therefore we need db
sed -i -e 's#^\(passwd:.*\) files#\1 files altfiles db#g;s#^\(shadow:.*\) files#\1 files altfiles db#g;s#^\(group:.*\) files#\1 files altfiles db#g' \
"$sysroot"/etc/nsswitch.conf "$sysroot"/etc/nsswitch.conf
mkdir -p "$sysroot"/usr/db mkdir -p "$sysroot"/usr/db
sed -i -e 's#/var/db#/usr/db#g' "$sysroot"/lib*/libnss_db-2*.so "$sysroot"/var/db/Makefile sed -i -e 's#/var/db#/usr/db#g' "$sysroot"/lib*/libnss_db-2*.so "$sysroot"/var/db/Makefile