about summary refs log tree commit diff
path: root/xchroot
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-02-08 19:50:16 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-02-08 19:50:16 +0100
commit232f6ba03d250a829cf239712cc3208c4bec866d (patch)
treea742ce06df6301dd51fa5cbe97799998867d8613 /xchroot
parentf6621318e7ab34999cfe310bd88b19bc1aa1518b (diff)
downloadxtools-232f6ba03d250a829cf239712cc3208c4bec866d.tar.gz
xtools-232f6ba03d250a829cf239712cc3208c4bec866d.tar.xz
xtools-232f6ba03d250a829cf239712cc3208c4bec866d.zip
xchroot: bind-mount /etc/resolv.conf
Diffstat (limited to 'xchroot')
-rwxr-xr-xxchroot4
1 files changed, 3 insertions, 1 deletions
diff --git a/xchroot b/xchroot
index 2e76f42..f70179d 100755
--- a/xchroot
+++ b/xchroot
@@ -23,9 +23,11 @@ esac
 mount --rbind /dev "$CHROOT/dev"
 mount --rbind /proc "$CHROOT/proc"
 mount --rbind /sys "$CHROOT/sys"
+touch "$CHROOT/etc/resolv.conf"
+mount --bind /etc/resolv.conf "$CHROOT/etc/resolv.conf"
 
 cleanup() {
-	umount -R "$CHROOT/dev" "$CHROOT/proc" "$CHROOT/sys"
+	umount -R "$CHROOT/dev" "$CHROOT/etc/resolv.conf" "$CHROOT/proc" "$CHROOT/sys"
 }
 
 trap cleanup EXIT INT