File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 2222 rm -r /home/" ${BASE_USER} " /.pydistutils.cfg
2323fi
2424
25+ if [ -f /etc/resolv.conf.link ]; then
26+ echo " Restoring original symlink for resolv.conf"
27+ resolvconf_target=$( cat /etc/resolv.conf.link)
28+ ln -sf " ${resolvconf_target} " /etc/resolv.conf
29+ rm /etc/resolv.conf.link
30+ elif [ -e /etc/resolv.conf.orig ]; then
31+ echo " Restoring original resolv.conf"
32+ [ -f /etc/resolv.conf ] && rm /etc/resolv.conf
33+ mv /etc/resolv.conf.orig /etc/resolv.conf || true
34+ fi
35+
2536# Remove common.sh after build (https://github.com/OctoPrint/CustoPiZer/issues/13)
2637if [ -f " /common.sh" ]; then
2738 rm -f /common.sh
Original file line number Diff line number Diff line change @@ -14,7 +14,16 @@ source /common.sh
1414install_cleanup_trap
1515
1616if [[ " ${EDITBASE_DISTRO} " == " armbian" || " ${EDITBASE_DISTRO} " == " ubuntu" ]]; then
17- mv /etc/resolv.conf /etc/resolv.conf.orig || true
17+ # workaround for Armbian > 24.5, because it uses a symlink for /etc/resolv.conf
18+ if [ -h /etc/resolv.conf ]; then
19+ link_target=" $( readlink /etc/resolv.conf) "
20+ echo " ${link_target} " > /etc/resolv.conf.link
21+ rm -f /etc/resolv.conf
22+ else
23+ mv /etc/resolv.conf /etc/resolv.conf.orig || true
24+ fi
25+
26+ # Set up resolv.conf with Google & Cloudflare public DNS servers
1827 echo " nameserver 8.8.8.8" > /etc/resolv.conf
1928 echo " nameserver 8.8.4.4" >> /etc/resolv.conf
2029 echo " nameserver 1.1.1.1" >> /etc/resolv.conf
You can’t perform that action at this time.
0 commit comments