From 334cf89cb5e6131578c323cbb4c9f9f67a4f32b6 Mon Sep 17 00:00:00 2001 From: r00t Date: Fri, 3 Jul 2015 22:48:37 -0400 Subject: [PATCH] finally fixing ipxe dns bug. --- .../etc/{resolvconf.conf.failover => resolvconf.conf} | 2 +- overlay/etc/systemd/scripts/livecd.fix.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) rename extra/pre-build.d/etc/{resolvconf.conf.failover => resolvconf.conf} (85%) diff --git a/extra/pre-build.d/etc/resolvconf.conf.failover b/extra/pre-build.d/etc/resolvconf.conf similarity index 85% rename from extra/pre-build.d/etc/resolvconf.conf.failover rename to extra/pre-build.d/etc/resolvconf.conf index e834bb2..4b92b5a 100644 --- a/extra/pre-build.d/etc/resolvconf.conf.failover +++ b/extra/pre-build.d/etc/resolvconf.conf @@ -5,4 +5,4 @@ resolv_conf=/etc/resolv.conf # If you run a local name server, you should uncomment the below line and # configure your subscribers configuration files below. #name_servers=127.0.0.1 -name_servers='4.2.2.1 4.2.2.2 4.2.2.3' +append_nameservers='4.2.2.1 4.2.2.2 4.2.2.3' diff --git a/overlay/etc/systemd/scripts/livecd.fix.sh b/overlay/etc/systemd/scripts/livecd.fix.sh index bf3c022..f10b8d8 100755 --- a/overlay/etc/systemd/scripts/livecd.fix.sh +++ b/overlay/etc/systemd/scripts/livecd.fix.sh @@ -39,8 +39,8 @@ do ifconfig ${i} down fi netctl restart ${i} > /dev/null 2>&1 - cat /etc/resolvconf.conf.failover > /etc/resolvconf.conf - resolvconf -u + #cat /etc/resolvconf.conf.failover > /etc/resolvconf.conf + #resolvconf -u done } @@ -50,3 +50,10 @@ then fuck_you_gimme_net systemctl restart openvpn@* fi + +# And lastly, do we need to set custom DNS servers? +host -s -W1 bdisk.square-r00t.net | egrep -q '^bdisk\.square-r00t\.net\ has\ address' +if [[ "${?}" != "0" ]]; +then + resolvconf -u +fi