[devtools] mkarchroot.in: copy host's /etc/hosts into the chroot
diff mbox

Message ID 20180627083627.29540-1-arch@eckner.net
State New
Headers show

Commit Message

Erich Eckner June 27, 2018, 8:36 a.m. UTC
From: Erich Eckner <git@eckner.net>

Otherwise any information necessary to connect to servers (source / pacman
mirrors) from the host's /etc/hosts is unavailable inside the chroot.

Signed-off-by: Erich Eckner <git@eckner.net>
---
 mkarchroot.in | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox

diff --git a/mkarchroot.in b/mkarchroot.in
index 52e363f..5983abc 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -87,6 +87,7 @@  pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
   "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
 
 printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
+cat '/etc/hosts' > "$working_dir/etc/hosts"
 echo 'LANG=en_US.UTF-8' > "$working_dir/etc/locale.conf"
 echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"