[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master f9c07b4f 1/4: Prefer a stable public DNS serv
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master f9c07b4f 1/4: Prefer a stable public DNS server |
Date: |
Thu, 18 Aug 2022 06:45:37 -0400 (EDT) |
branch: master
commit f9c07b4fc9161c67ce172dd130bfaa3165411c34
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Prefer a stable public DNS server
---
lmi_setup_20.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lmi_setup_20.sh b/lmi_setup_20.sh
index 367b33fc..35e908c0 100755
--- a/lmi_setup_20.sh
+++ b/lmi_setup_20.sh
@@ -46,6 +46,15 @@ chmod 755 /usr/sbin/policy-rc.d
dpkg-divert --divert /usr/bin/ischroot.debianutils --rename /usr/bin/ischroot
ln -s /bin/true /usr/bin/ischroot
+# Prefer google's DNS server in case the host system's changes. See:
+# https://lists.nongnu.org/archive/html/lmi/2022-08/msg00014.html
+# Prepending a record is brutally simple. A corporate server used
+# for building lmi lists five nameservers in its configuration file,
+# with a comment indicating that the last two might be ignored, so
+# adding a new record at the end might not work.
+
+sed -i /etc/resolv.conf -e'1s/^/nameserver 8.8.8.8\n/'
+
# For now at least, ignore this warning:
# dpkg-divert: warning: diverting file '/usr/bin/ischroot' from an Essential
# package with rename is dangerous, use --no-rename