Closed sundarnagarajan closed 7 years ago
On Ubuntu 17.10 systemd provides the system-wide DNS resolver. On such distributions, /etc/resolv.conf
inside the ISO points at ../run/systemd/resolve/stub-resolv.conf
and the target will not exist IFF you are remastering on an older distribution (like xenial 16.04) that does not use systemd as the system-wide resolver.
Answer is to detect that there is no nameserver line in /etc/resolv.conf
, and if so, we move the existing /etc/resolv.conf
aside and replace it with a file pointing at Google Public DNS. At the end of the script we restore the original /etc/resolv.conf
Error message is: