diff --git a/arch-chroot.in b/arch-chroot.in index de7b543..50ca78a 100644 --- a/arch-chroot.in +++ b/arch-chroot.in @@ -21,7 +21,7 @@ chrootdir=$1 [[ -d $chrootdir ]] || die "Can't create chroot on non-directory %s" "$1" -trap 'api_fs_umount "$chrootdir" 2>/dev/null' EXIT +trap '{ api_fs_umount "$chrootdir"; umount "$chrootdir/etc/resolv.conf"; } 2>/dev/null' EXIT api_fs_mount "$chrootdir" || die "failed to setup API filesystems in chroot %s" "$1" mount -B /etc/resolv.conf "$chrootdir/etc/resolv.conf"