修复pardus-chroot挂载时出现DNS错误的问题

This commit is contained in:
gfdgd xi 2022-12-25 22:33:26 +08:00
parent e7b8127cd3
commit 5db45ff3e5

View File

@ -24,7 +24,7 @@ mount -t tmpfs tmpfs "$DESTDIR/dev/shm"
if [[ -d /sys/firmware/efi/ ]] ; then if [[ -d /sys/firmware/efi/ ]] ; then
mount -t efivarfs efivarfs "$DESTDIR/sys/firmware/efi/efivars" mount -t efivarfs efivarfs "$DESTDIR/sys/firmware/efi/efivars"
fi fi
cat /etc/resolv.conf > /$DESTDIR/etc/resolv.conf cat /etc/resolv.conf > $DESTDIR/etc/resolv.conf
SHELL=/bin/bash unshare --fork --pid chroot "$DESTDIR" "$@" SHELL=/bin/bash unshare --fork --pid chroot "$DESTDIR" "$@"
if [[ -d /sys/firmware/efi/ ]] ; then if [[ -d /sys/firmware/efi/ ]] ; then
while umount "$DESTDIR/sys/firmware/efi/efivars" 2>/dev/null ; do : ;done while umount "$DESTDIR/sys/firmware/efi/efivars" 2>/dev/null ; do : ;done