You are not logged in.

#1 2015-07-03 22:12:28

mojo19
Member
Registered: 2015-07-03
Posts: 2

[SOLVED]Virtual wlan interface at system start

Hello,

im trying to create a virtual wlan interface using iw at system start.
I wrote a service unit which executes a custom script.
The problem is, the wlan interface doesn't exist at this point, and so no virtual interface ist created.

So my question:
How can i tell systemd to run the service after the interface is initialized?
Or must i use udev?

Here's my service file:

[Unit]
Description=Setup virtual WLAN interfaces
After=sys-subsystem-net-devices-wlp3s0.device
#Wants=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/root/bin/setup_vni start
ExecStop=/root/bin/setup_vni stop

[Install]
WantedBy=multi-user.target

Last edited by mojo19 (2015-07-04 00:31:53)

Offline

#2 2015-07-04 00:29:50

mojo19
Member
Registered: 2015-07-03
Posts: 2

Re: [SOLVED]Virtual wlan interface at system start

solved it by myself
i have to add the following line to the unit section:

BindsTo=sys-subsystem-net-devices-wlp3s0.device

Offline

Board footer

Powered by FluxBB