[systemd-devel] Custom options and passing options via command line.
Andrei Borzenkov
arvidjaar at gmail.com
Tue May 10 09:38:37 UTC 2022
On 08.05.2022 20:19, Kamil Jońca wrote:
> I have question about custom options in network interface definitions
> and passing it via command line.
> In currend Debian tools
>
> (https://manpages.debian.org/buster/ifupdown/interfaces.5.en.html)
> there is a possibility to define custom option and passing it to up/down
> script (see ENVIRONMENT VARIABLES section)
> Is it possible in *.network files?
>
> Moreover: can I pass option during interface up/down?
> For example, in my if-up*/if-down* scripts I have code for replacing (or
> not!) default route when needed.[1]
>
> Then I can execute something like:
>
> --8<---------------cut here---------------start------------->8---
> ifup wlan0 -o replacedefaultroute=on
> --8<---------------cut here---------------end--------------->8---
>
> how I can achieve this with networkctl (or other systemd tool)?
>
> KJ
> [1]
> in man systemd.network
> I found
>
> [DHCPV4]
> UseRoutes=
>
> but I am not sure if this is about default routes or only classless
> static routes
>
Default route is UseGateway option which defaults to the value of
UseRoutes option.
More information about the systemd-devel
mailing list