You are not logged in.

#1 2014-09-20 09:33:17

k0ste
Member
From: Russia
Registered: 2013-12-16
Posts: 5
Website

Can systemd-networkd run commands after interface up (like Netctl)?

Any netctl profile cat run commands via ExecUpPost, like this:

Description='Bond Interface'
Interface='bond0'
Connection='bond'
BindsToInterfaces='lan wan eth'
IP='static'
Address="192.168.0.193/26"
DNS="127.0.0.1"
ExecUpPost='/usr/bin/ethtool -K wan tso off; /usr/bin/ethtool -K lan tso off; /usr/bin/ethtool -K eth tso off'

Can systemd-networkd do something? I read man's about systemd.netdev and systemd.link - no information.

Offline

#2 2014-09-20 13:22:25

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Can systemd-networkd run commands after interface up (like Netctl)?

Write a *.service file for whatever commands you want to run, with

After=systemd-networkd-wait-online.service

in it.

Offline

#3 2014-09-20 13:26:29

k0ste
Member
From: Russia
Registered: 2013-12-16
Posts: 5
Website

Re: Can systemd-networkd run commands after interface up (like Netctl)?

tomk wrote:

Write a *.service file for whatever commands you want to run, with

After=systemd-networkd-wait-online.service

in it.

Yep, I can do this. But, it is inconvenient, cause after few years we forget about it. In the config is clearly.

Offline

#4 2014-09-20 13:35:47

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Can systemd-networkd run commands after interface up (like Netctl)?

OK - submit a feature request to the networkd devs about it, preferably with a patch attached.

Personally, I don't see how it's inconvenient.

Offline

Board footer

Powered by FluxBB