diff --git a/templates/network-manager/50-miaou-resolver b/templates/network-manager/50-miaou-resolver index c38d0cd..a137dcd 100755 --- a/templates/network-manager/50-miaou-resolver +++ b/templates/network-manager/50-miaou-resolver @@ -2,6 +2,8 @@ if [[ "$2" == "up" ]]; then + chattr -i /etc/resolv.conf + ACTIVE_CONNECTION=$(nmcli -g NAME connection show --active | head -n1) ACTIVE_DEVICE=$(nmcli -g DEVICE connection show --active | head -n1) BRIDGE=$(ip addr show lxdbr0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1) @@ -19,6 +21,9 @@ if [[ "$2" == "up" ]]; then else logger -t NetworkManager:Dispatcher -p info "on $ACTIVE_DEVICE:$ACTIVE_CONNECTION nameservers look fine" fi + + chattr +i /etc/resolv.conf + else if [[ "$2" == "connectivity-change" ]]; then ACTIVE_DEVICE=$(nmcli -g DEVICE connection show --active | head -n1)