From 041fde012385cd83876573edd97e30d25f4fb893 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Mon, 19 Jun 2023 17:31:16 -0400 Subject: selfstrap: bind mount /etc/resolv.conf in chroot --- selfstrap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/selfstrap b/selfstrap index 3521bb2..4aa6ef9 100755 --- a/selfstrap +++ b/selfstrap @@ -181,6 +181,8 @@ prepare_chroot() mountpoint -q "$TARGET"/proc || mount -t proc proc "$TARGET"/proc mountpoint -q "$TARGET"/sys || mount -t sysfs sysfs "$TARGET"/sys mountpoint -q "$TARGET"/dev || mount --bind /dev "$TARGET"/dev + [ -e "$TARGET"/etc/resolv.conf ] || touch "$TARGET"/etc/resolv.conf + mountpoint -q "$TARGET"/etc/resolv.conf || mount --bind /etc/resolv.conf "$TARGET"/etc/resolv.conf } cleanup_chroot() @@ -189,6 +191,7 @@ cleanup_chroot() umount "$TARGET"/proc || fail=y umount "$TARGET"/sys || fail=y umount "$TARGET"/dev || fail=y + umount "$TARGET"/etc/resolv.conf || fail=y [ ! "$fail" ] } -- cgit v1.2.3