Update S30eth

To prevent some regions from not receiving the update package, add some DNS servers. However, please note that after setting a static IP, the /etc/resolv.conf file will be overwritten, and the old file will be stored as /etc/resolv.conf.old.
This commit is contained in:
BuGu
2025-04-16 16:01:25 +08:00
parent c6af287b11
commit 59a03cacef

View File

@@ -29,10 +29,14 @@ start() {
arping -Dqc2 -Ieth0 $addr || continue arping -Dqc2 -Ieth0 $addr || continue
ip a add $inet brd + dev eth0 ip a add $inet brd + dev eth0
ip r add default via $gw dev eth0 ip r add default via $gw dev eth0
cp -f /etc/resolv.conf /etc/resolv.conf.old
cat > /etc/resolv.conf << EOF cat > /etc/resolv.conf << EOF
nameserver $gw nameserver $gw
nameserver 8.8.4.4
nameserver 8.8.8.8 nameserver 8.8.8.8
nameserver 114.114.114.114 nameserver 114.114.114.114
nameserver 119.29.29.29
nameserver 223.5.5.5
EOF EOF
break break
done && done &&