Improve DNS to use resolvconf
This commit is contained in:
parent
ce550de6ca
commit
06747ff290
|
@ -1,4 +1,4 @@
|
|||
# Configuration for resolvconf(8)
|
||||
# See resolvconf.conf(5) for details
|
||||
|
||||
resolvconf=NO
|
||||
#resolvconf=NO
|
||||
|
|
|
@ -10,6 +10,17 @@ if [ ! -w / ]; then
|
|||
mount -o remount,rw /;
|
||||
fi
|
||||
|
||||
# Make sure resolv.conf is a symlink to so resolvconf works
|
||||
if [ ! -h /etc/resolv.conf ]; then
|
||||
rm -f /etc/resolv.conf
|
||||
touch /etc/resolvconf/run/resolv.conf
|
||||
ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf
|
||||
|
||||
sync
|
||||
reboot
|
||||
sleep 10s
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Disable autosuspend for USB drives
|
||||
for dev in /sys/bus/usb/devices/*/power/control; do echo "on" > $dev; done
|
||||
|
@ -251,11 +262,11 @@ if [ $IS_RASPI -eq 1 ] || [ $IS_ROCKPRO64 -eq 1 ]; then
|
|||
fi
|
||||
|
||||
# Add some DNS servers to make domain lookup more likely
|
||||
echo '' >> /etc/resolv.conf
|
||||
echo '# Added at myNode startup' >> /etc/resolv.conf
|
||||
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
|
||||
echo 'nameserver 8.8.4.4' >> /etc/resolv.conf
|
||||
echo 'nameserver 1.1.1.1' >> /etc/resolv.conf
|
||||
#echo '' >> /etc/resolv.conf
|
||||
#echo '# Added at myNode startup' >> /etc/resolv.conf
|
||||
#echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
|
||||
#echo 'nameserver 8.8.4.4' >> /etc/resolv.conf
|
||||
#echo 'nameserver 1.1.1.1' >> /etc/resolv.conf
|
||||
|
||||
|
||||
# Make sure every enabled service is really enabled
|
||||
|
|
Loading…
Reference in New Issue
Block a user