path: root/config/chroot_local-hooks/99-resolv
diff options
Diffstat (limited to 'config/chroot_local-hooks/99-resolv')
1 files changed, 24 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/99-resolv b/config/chroot_local-hooks/99-resolv
new file mode 100755
index 0000000..1e798b3
--- /dev/null
+++ b/config/chroot_local-hooks/99-resolv
@@ -0,0 +1,24 @@
+# Nota bene: if the custom /etc/resolv.conf file was in
+# chroot_local-includes, it would be installed inside the chroot
+# before our chroot_local-hooks run. Some of these scripts, needing
+# a working networking setup, would then awfully break.
+# Including common functions
+. "${LH_BASE:-/usr/share/live-helper}"/
+# Setting static variables
+DESCRIPTION="$(Echo 'setup custom /etc/resolv.conf')"
+# Reading configuration files
+Read_conffiles config/all config/common config/chroot
+Echo_message "Configuring file /etc/resolv.conf"
+echo 'nameserver' > /etc/resolv.conf
+# make sure lh_chroot_resolv will not overwrite our nice,
+# custom /etc/resolv.conf with a random .orig one
+echo 'nameserver' > /etc/resolv.conf.orig