functions: provide nss_systemd-less nsswitch.conf in chroots.

(cherry picked from commit 4d4f113f42)
uc20-no-fixed-size
Dimitri John Ledkov 5 years ago
parent 2be2852ee0
commit 558bcbc47e
No known key found for this signature in database
GPG Key ID: 9B8EC849D5EF70ED

@ -113,6 +113,8 @@ setup_mountpoint() {
mount -t tmpfs none "$mountpoint/var/cache/apt" mount -t tmpfs none "$mountpoint/var/cache/apt"
mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp mv "$mountpoint/etc/resolv.conf" resolv.conf.tmp
cp /etc/resolv.conf "$mountpoint/etc/resolv.conf" cp /etc/resolv.conf "$mountpoint/etc/resolv.conf"
mv "$mountpoint/etc/nsswitch.conf" nsswitch.conf.tmp
sed 's/systemd//g' nsswitch.conf.tmp > "$mountpoint/etc/nsswitch.conf"
chroot "$mountpoint" apt-get update chroot "$mountpoint" apt-get update
} }
@ -130,6 +132,7 @@ teardown_mountpoint() {
umount $submount umount $submount
done done
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf" mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
mv nsswitch.conf.tmp "$mountpoint/etc/nsswitch.conf"
} }
mount_partition() { mount_partition() {

Loading…
Cancel
Save