Browse Source

miaou-resolver attr read-only resolv.conf

main
pvincent 5 months ago
parent
commit
c7163547db
  1. 5
      templates/network-manager/50-miaou-resolver

5
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)

Loading…
Cancel
Save