You are not logged in.

#1 2025-08-28 06:52:18

Kisuke-CZE
Member
Registered: 2017-03-16
Posts: 15
Website

[SOLVED] NetworkManager dispatcher.d script does not work after update

Hi,

I updated my Arch installation today (previous update was two weeks ago). And since the update my NetworkManager dispatcher.d script (script in /etc/NetworkManager/dispatcher.d) stopped working.

The script does work partialy. But setting up systemd-resolved does nothing.
Command which worked and does not work now is:

resolvectl --interface="tun-company" --set-dns="10.1.2.3" --set-dns="10.1.3.4" --set-domain=somedomain.com --set-domain=otherdomain.corp

Command works when it is run outside dispatcher script.

Anyone with idea what changed? I am just starting a research about what could possibly change (maybe some new systemd isolation? not sure).

Also any idea how to debug dispatcher scripts? Output of dispatcher script is not included in journal (journalctl -u NetworkManager-dispatcher ). And outputting to /tmp/ does nothing (hence suspect that systemd isolation thing).

Last edited by Kisuke-CZE (2025-08-28 09:05:48)

Offline

#2 2025-08-28 07:45:52

-thc
Member
Registered: 2017-03-15
Posts: 997

Re: [SOLVED] NetworkManager dispatcher.d script does not work after update

So your VPN is a NetworkManager connection but somehow cannot notify systemd-resolved of the new connection properties? How so?

Offline

#3 2025-08-28 09:04:39

Kisuke-CZE
Member
Registered: 2017-03-16
Posts: 15
Website

Re: [SOLVED] NetworkManager dispatcher.d script does not work after update

Fixed it by changing script from:

if [ "${1}" == "${DEVICE_NAME}" ]
then
  case ${2} in
    "up")
      ...
      ;;
    "down")
      ...
      ;;
  esac
fi

to

if [ "${1}" == "${DEVICE_NAME}" ]
then
  case ${2} in
    "vpn-up")
      ...
      ;;
    "vpn-down")
      ...
      ;;
  esac
fi

But it was kinda luck. Just tried this based on info from NetworkManager dispatcher manual.
Aparrently passed argument was changed somehow. Cannot find any info about it.

Offline

Board footer

Powered by FluxBB