Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
switching to systemd and confusted
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Wed Dec 25, 2013 6:15 pm    Post subject: switching to systemd and confusted Reply with quote

I am trying to get my network up and running via wpa_supplicant which is how I had it figured before with init scripts.
I followed the tutorial here.

http://wiki.gentoo.org/wiki/Systemd

I created the symbolic link /etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlp4s0.service
The device comes up but an IP address isn't configures. which other net services should be enabled. Like I said I am not using network manager. Just wpa_supplicant. Thanks
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1371

PostPosted: Wed Dec 25, 2013 9:52 pm    Post subject: Reply with quote

dhcpcd
_________________
fun2gen2
Back to top
View user's profile Send private message
hadrons123
Tux's lil' helper
Tux's lil' helper


Joined: 08 Mar 2012
Posts: 90
Location: chennai

PostPosted: Thu Dec 26, 2013 6:56 am    Post subject: Reply with quote

if not networkmanager you can use wicd.
_________________
LENOVO Y580 FHD Intel® Core™ i7-3630QM CPU @ 2.40GHz × 8 |660M GTX NVIDIA | 16GB SanDisk SSD
Back to top
View user's profile Send private message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Fri Dec 27, 2013 1:33 am    Post subject: Reply with quote

ulenrich wrote:
dhcpcd


Thanks, tried it but it didn't make a difference. everything I would think should be loaded is loaded. the device is up with no IP assigned.

Do I have to use some type of network manager for systemd? I am beginning to come to the concluesion that systemd's "scripts" (please excuse my terminology) will not work with a manual configuration of /etc/wpa_supplicant/wpa_supplicant.conf which is what I have done in the past. is this the case?
Back to top
View user's profile Send private message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Mon Dec 30, 2013 4:29 am    Post subject: Reply with quote

mreff555 wrote:
ulenrich wrote:
dhcpcd


Thanks, tried it but it didn't make a difference. everything I would think should be loaded is loaded. the device is up with no IP assigned.

Do I have to use some type of network manager for systemd? I am beginning to come to the concluesion that systemd's "scripts" (please excuse my terminology) will not work with a manual configuration of /etc/wpa_supplicant/wpa_supplicant.conf which is what I have done in the past. is this the case?


Get familiar with the basic commands supplied to interrogate your systemd status they are very powerful!!

View all log messages from last boot...
Code:
journalctl -b -x


View status of dhcpcd.service...
Code:
systemctl status dhcpcd.service

(shows whether dhcpd daemon is running and most recent logged output)

View all log messages of dhcpcd.service...
Code:
journalctl --unit dhcpcd.service


Enable dhcpcd.service at boot...
Code:
systemctl enable dhcpcd.service


Start dhcpcd.service now (if it's not already running or is disabled)...
Code:
systemctl start dhcpcd.service


The dhcpcd.service should assign an IP address to any interface that is up... It certainly does on my system - even when NetworkManager is broken (once again) :roll:

Also worth checking out...
freedesktop.org systemd
As the Gentoo Wiki on systemd is a bit lack-lacklustre at present...

Hope that helps. :lol:

Bob
Back to top
View user's profile Send private message
Kompi
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 252
Location: Germany

PostPosted: Mon Dec 30, 2013 9:16 am    Post subject: Reply with quote

mreff555 wrote:
Do I have to use some type of network manager for systemd? I am beginning to come to the concluesion that systemd's "scripts" (please excuse my terminology) will not work with a manual configuration of /etc/wpa_supplicant/wpa_supplicant.conf which is what I have done in the past. is this the case?


No, you don't have to use a manager, it should work the way you are trying to do it.

The systemd service file should read the /etc/wpa_supplicant/wpa_supplicant.conf file. That is, at least the version I have installed with the wpa_supplicant package does just that:

/usr/lib/systemd/system/wpa_supplicant@.service wrote:
ExecStart=/usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i%I


If you network is up as you say, then there may be only a problem with getting the IP via DHCP.

What is the output of dhcpcd? (try manually: "dhcpcd wlp4s0" or check the journal)

If there is no response, check you are actually connected and authenticated to the right net ("iwconfig wlp4s0") after wpa_supp is started. If you are, there must be something else wrong with the connection to th DHCP server.
Back to top
View user's profile Send private message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Tue Dec 31, 2013 5:20 pm    Post subject: Reply with quote

Alright. I got wpa_supplicant working, but the method feels a bit unorthodox to me and I was hoping someone had a better solution.
I noticed two problems within the wpa_supplicant@.service script.

1. My wireless card does NOT autodetect the driver. It will not work unless I specify -Dnl80211. As far as I can tell from reading man pages there is no way to specify this in /etc/wpa_supplicant/wpa_supplicant.conf. It seems like there should be.

2.Since my udev uses intelligent device naming my wireless device is wlp4s0, not wlan0.

My changes are in bold.
Code:

[Unit]
Description=WPA supplicant daemon (interface-specific version)

# NetworkManager users will probably want the dbus version instead.

[Service]
Type=simple
ExecStart=/usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i%I[b] -Dnl80211[/b]

[Install]
Alias=multi-user.target.wants/wpa_supplicant@[b]%I[/b].service


Now if this is what I have to do I think I remember reading that there is a correct way to manage custom scripts in the /etc directory. In that case I would just disable the original and put this script in /etc/.../. I'm just wondering if there is a better way to do this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum