From 05b36e029c6c2a5f9d8c8c515e52aa1597db9861 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 15 Jul 2012 10:09:49 -0400 Subject: [PATCH] arch-chroot: umount /etc/resolv.conf as part of trap --- arch-chroot.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"