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 <