[arch-projects] [devtools] [PATCH] mkarchroot.in: copy host's /etc/hosts into the chroot
arch at eckner.net
arch at eckner.net
Wed Jun 27 08:36:28 UTC 2018
From: Erich Eckner <git at 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 at eckner.net>
---
mkarchroot.in | 1 +
1 file changed, 1 insertion(+)
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"
--
2.18.0
More information about the arch-projects
mailing list