From 13ea64b1e9f9b5f3a7063cf4d773bad41f7653f1 Mon Sep 17 00:00:00 2001 From: Lane Jennison Date: Sat, 8 Sep 2018 21:40:51 -0400 Subject: [PATCH] Revert "Try to fix DNS (privacy) issues" This reverts commit f10acc0080825faf711eb6e6b7425910d75d840c. Making room for alternative approach --- lib/chroot-buildpackages.sh | 1 + lib/distributions.sh | 7 +++++-- packages/bsp/common/usr/lib/armbian/armbian-firstrun | 7 ------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/chroot-buildpackages.sh b/lib/chroot-buildpackages.sh index b6de0f2724..d64aed5ec3 100644 --- a/lib/chroot-buildpackages.sh +++ b/lib/chroot-buildpackages.sh @@ -59,6 +59,7 @@ create_chroot() printf '#!/bin/sh\nexit 101' > $target_dir/usr/sbin/policy-rc.d chmod 755 $target_dir/usr/sbin/policy-rc.d rm $target_dir/etc/resolv.conf 2>/dev/null + echo "1.1.1.1" > $target_dir/etc/resolv.conf rm $target_dir/etc/hosts 2>/dev/null echo "127.0.0.1 localhost" > $target_dir/etc/hosts mkdir -p $target_dir/root/{build,overlay,sources} $target_dir/selinux diff --git a/lib/distributions.sh b/lib/distributions.sh index 91951f103f..782dc0f744 100644 --- a/lib/distributions.sh +++ b/lib/distributions.sh @@ -235,8 +235,7 @@ install_common() # DNS fix. package resolvconf is not available everywhere if [ -d /etc/resolvconf/resolv.conf.d ]; then - echo -e "# In case of DNS problems, try uncommenting this and reboot for debugging\n# nameserver 1.1.1.1" \ - > $SDCARD/etc/resolvconf/resolv.conf.d/head + echo 'nameserver 1.1.1.1' > $SDCARD/etc/resolvconf/resolv.conf.d/head fi # premit root login via SSH for the first boot @@ -302,6 +301,8 @@ install_distribution_specific() exit 0 EOF chmod +x $SDCARD/etc/rc.local + # DNS fix + sed -i "s/#DNS=.*/DNS=1.1.1.1/g" $SDCARD/etc/systemd/resolved.conf ;; bionic) # remove doubled uname from motd @@ -332,6 +333,8 @@ install_distribution_specific() version: 2 renderer: NetworkManager EOF + # DNS fix + sed -i "s/#DNS=.*/DNS=1.1.1.1/g" $SDCARD/etc/systemd/resolved.conf # Journal service adjustements sed -i "s/#Storage=.*/Storage=volatile/g" $SDCARD/etc/systemd/journald.conf sed -i "s/#Compress=.*/Compress=yes/g" $SDCARD/etc/systemd/journald.conf diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstrun b/packages/bsp/common/usr/lib/armbian/armbian-firstrun index 003661db4e..b0a9737ea5 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstrun +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstrun @@ -56,13 +56,6 @@ case "$1" in /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml fi - # check whether DNS resolution works, if not switch to Cloudflare DNS - fping cloudflare.com >/dev/null 2>&1 - if [ $? -ne 0 ]; then - sed -i "s/#DNS=.*/DNS=1.1.1.1/" /etc/systemd/resolved.conf - sed -i "s/# nameserver.*/nameserver 1.1.1.1/" /etc/resolvconf/resolv.conf.d/head - fi - # some hardware workarounds case $LINUXFAMILY in sun7i|sun8i)