You are not logged in.

#1 2012-11-10 20:10:00

LordMord
Member
Registered: 2012-11-10
Posts: 4

Wlan0 interfaces loads after network.service

Hello,

i have set up systemd to start a 'network.service' unit which automatically connects to my wlan.
The problem i have is that at this point the wlan0 interfaces is not loaded yet.
So i have to do 'systemctl start network.service' manualy after i login.

Any idea how to fix that?

Edit:

I am using a usb-wlan-stick if that matters.

Last edited by LordMord (2012-11-10 20:13:05)

Offline

#2 2012-11-11 01:56:59

mzneverdies
Member
Registered: 2012-02-04
Posts: 147

Re: Wlan0 interfaces loads after network.service

I'm pretty new to systemd, but are you sure network.service does exists?

Can't tell you it does not, but I followed this howto and everything worked fine (i'm using a wired connection)

network (DHCP ethernet connection)
sudo systemctl enable dhcpcd@eth0.service

networkmanager (network replacement)
sudo systemctl enable NetworkManager.service

wicd (network replacement, lighter than networkmanager)
sudo systemctl enable wicd.service

Offline

#3 2012-11-11 05:37:52

LordMord
Member
Registered: 2012-11-10
Posts: 4

Re: Wlan0 interfaces loads after network.service

Yea i created the 'network.service' following these Instructions . And the command works fine after i log in and the interface is loaded. But if it check the status with 'systemctl status network.service' before manually starting it tells me that if failed cause it did not find the interface wlan0.

If there is a way to automatically run a command with sudo after login that would work as well.

Here is the error message:

[roman@ArchDesktop ~]$ sudo systemctl status network.service
[sudo] password for roman: 
network.service - Network Connectivity
	  Loaded: loaded (/etc/systemd/system/network.service; enabled)
	  Active: failed (Result: exit-code) since Sun, 2012-11-11 07:46:53 CET; 1min 7s ago
	 Process: 373 ExecStart=/sbin/ip link set dev wlan0 up (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/network.service

Nov 11 07:46:53 ArchDesktop ip[373]: Cannot find device "wlan0"

Last edited by LordMord (2012-11-11 05:49:59)

Offline

#4 2012-11-11 06:21:50

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,323

Re: Wlan0 interfaces loads after network.service

Its a bug and is currently being addressed
https://bbs.archlinux.org/viewtopic.php?id=151662 has links to a proposed patch

Offline

#5 2012-11-11 06:44:30

LordMord
Member
Registered: 2012-11-10
Posts: 4

Re: Wlan0 interfaces loads after network.service

Thanks skunktrader got it to work. Wouldn't it makes sense to change the Instructions as to contain these 2 Lines:

BindsTo=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device

Offline

#6 2012-11-11 08:42:07

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

Re: Wlan0 interfaces loads after network.service

It's a wiki, you can make the change yourself.

Offline

Board footer

Powered by FluxBB