From a3c101e2c267f67c1a3a10bbb62ab68d5149b3bd Mon Sep 17 00:00:00 2001 From: chiefwigms Date: Mon, 20 Jul 2020 15:24:55 -0600 Subject: [PATCH] Possible network fix --- scripts/pi/firstboot.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/pi/firstboot.sh b/scripts/pi/firstboot.sh index 4a7bda8..646d940 100644 --- a/scripts/pi/firstboot.sh +++ b/scripts/pi/firstboot.sh @@ -21,6 +21,11 @@ AP_PASS="PICOBREW" # Enable root login #sed -i 's/.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config +# Have Name Service Switch use DNS +# On Boot: +# hosts: files mdns4_minimal [NOTFOUND=return] dns +sed -i 's/\(.*hosts:.*\) \[.*\]\(.*\)/\1\2/' /etc/nsswitch.conf + # Enable ssh touch /boot/ssh @@ -341,6 +346,11 @@ read only = no EOF service smbd restart +# Have Name Service Switch use DNS +# After resolve install: +# hosts: files resolve [!UNAVAIL=return] dns +sed -i 's/\(.*hosts:.*\) \[.*\]\(.*\)/\1\2/' /etc/nsswitch.conf + # Startup Script sed -i 's/exit 0//g' /etc/rc.local cat >> /etc/rc.local <