File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,27 @@ systemctl is-active systemd-networkd || echo "systemd-networkd disabled"
2626# Check what's managing your interface
2727networkctl status $IFACE
2828
29+ # Check network configs
30+ echo " Checking 10-netplan-eth0.network"
31+ if [ -f /run/systemd/network/10-netplan-eth0.network ]; then
32+ cat /run/systemd/network/10-netplan-eth0.network
33+ # Add UseDNS=false to the DHCP section
34+ cat >> /run/systemd/network/10-netplan-eth0.network << EOF
35+
36+ UseDNS=false
37+ EOF
38+ echo " updated"
39+ cat /run/systemd/network/10-netplan-eth0.network
40+ # Restart systemd-networkd to apply changes
41+ systemctl restart systemd-networkd
42+ elif [ -d /run/systemd/network/ ]; then
43+ echo " ls -la /run/systemd/network/"
44+ ls -la /run/systemd/network/
45+ else
46+ echo " ls -la /run/systemd/"
47+ ls -la /run/systemd/
48+ fi
49+
2950# Get current DNS server
3051echo " Current configuration:"
3152resolvectl status " $IFACE " | grep -E ' Current DNS Server:|DNS Servers:'
You can’t perform that action at this time.
0 commit comments