lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 3a1a26e1 3/3: Force DNS to work in chroots


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 3a1a26e1 3/3: Force DNS to work in chroots
Date: Fri, 13 Jan 2023 07:28:49 -0500 (EST)

branch: master
commit 3a1a26e19ecafd7b0aca6f96e2fe16ffdea47b60
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Force DNS to work in chroots
---
 lmi_setup_11.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lmi_setup_11.sh b/lmi_setup_11.sh
index f442086d..37105d09 100755
--- a/lmi_setup_11.sh
+++ b/lmi_setup_11.sh
@@ -131,5 +131,11 @@ EOF
 # been run previously:
 du   -sb /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
 
+# These two files are necessary, but as of 2023-01 'schroot' provides
+# no '/etc/hosts' at all; copy '/etc/nsswitch.conf' as well because it
+# has been a problem in the past--see:
+#   https://lists.nongnu.org/archive/html/lmi/2022-08/msg00014.html
+cp -a /etc/hosts /etc/nsswitch.conf /srv/chroot/"${CHRTNAME}"/etc
+
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Ran 'debootstrap'."  | tee /dev/tty
+echo "$stamp $0: Ran 'debootstrap'; configured networking."  | tee /dev/tty



reply via email to

[Prev in Thread] Current Thread [Next in Thread]