Looked url, searched ‘custom’ and ‘script’ (page and site) with no match that im looking for. All i know now and looking more around; netplan way to use custom script when interface comes up is networkd-dispatcher way, that in Ubuntu 24.04 do not work.
Juntti
Perus Juntti.
- 1 Post
- 2 Comments
Joined 2 years ago
Cake day: July 13th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
‘journalctl -u networkd-dispatcher’ says:
systemd[1]: Starting networkd-dispatcher.service - Dispatcher daemon for systemd-networkd... networkctl[2463]: systemd-networkd is not running, output might be incomplete.` systemd[1]: networkd-dispatcher.service: Got notification message from PID 2463, but reception only permitted for main PID 2242 networkd-dispatcher[2242]: ERROR:Unknown state for interface NetworkctlListState(idx=1, name='lo', type='loopback', operational='-', administrative='unmanaged'): - networkd-dispatcher[2242]: Traceback (most recent call last): networkd-dispatcher[2242]: File "/usr/bin/networkd-dispatcher", line 299, in trigger_all networkd-dispatcher[2242]: self.handle_state(iface_name, networkd-dispatcher[2242]: File "/usr/bin/networkd-dispatcher", line 349, in handle_state networkd-dispatcher[2242]: raise UnknownState(operational_state) networkd-dispatcher[2242]: UnknownState: - networkd-dispatcher[2242]: ERROR:Unknown state for interface NetworkctlListState(idx=2, name='enp3s0', type='ether', operational='-', administrative='unmanaged'): - networkd-dispatcher[2242]: Traceback (most recent call last): networkd-dispatcher[2242]: File "/usr/bin/networkd-dispatcher", line 299, in trigger_all networkd-dispatcher[2242]: self.handle_state(iface_name, networkd-dispatcher[2242]: File "/usr/bin/networkd-dispatcher", line 349, in handle_state networkd-dispatcher[2242]: raise UnknownState(operational_state) networkd-dispatcher[2242]: UnknownState: - networkd-dispatcher[2242]: ERROR:Unknown state for interface NetworkctlListState(idx=3, name='wlp0s20f3', type='wlan', operational='-', administrative='unmanaged'): - networkd-dispatcher[2242]: Traceback (most recent call last): networkd-dispatcher[2242]: File "/usr/bin/networkd-dispatcher", line 299, in trigger_all networkd-dispatcher[2242]: self.handle_state(iface_name, networkd-dispatcher[2242]: File "/usr/bin/networkd-dispatcher", line 349, in handle_state networkd-dispatcher[2242]: raise UnknownState(operational_state) networkd-dispatcher[2242]: UnknownState: -
That error comes either I have my script there or not.
I think scripts in ‘/etc/networkd-dispatcher/routable.d’ or ‘/usr/lib/networkd-dispatcher/routable.d’ are not ran because networkd-dispatched do not get interface state.
Based on https://netplan.io/faq > ‘Use pre-up, post-up, etc. hook scripts’; routable.d is correct location in my case.