Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd no internet connection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Galumph
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2010
Posts: 122
Location: Israel

PostPosted: Wed Dec 07, 2011 2:49 pm    Post subject: systemd no internet connection Reply with quote

I think systemd messed up the start up order of the net service. I have to restart net.eth0 whenever I reboot in order to get internet connection. How do I view and change the order in which services start up with systemd?
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Wed Dec 07, 2011 2:59 pm    Post subject: Reply with quote

How do you manage to restart net.eth0 if OpenRC is not running? 8O

To have network, you need to make sure the dhcpcd.service and the network.target are enabled.

Code:
$ systemctl status network.target dhcpcd.service
network.target - Network
     Loaded: loaded (/lib64/systemd/system/network.target; enabled)
     Active: active since Tue, 06 Dec 2011 22:09:28 -0500; 11h ago

dhcpcd.service - Lightweight DHCP client daemon
     Loaded: loaded (/lib64/systemd/system/dhcpcd.service; enabled)
     Active: active (running) since Tue, 06 Dec 2011 22:09:28 -0500; 11h ago
   Main PID: 2002 (dhcpcd)
     CGroup: name=systemd:/system/dhcpcd.service
        └ 2002 /sbin/dhcpcd -q --nobackground

_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
Galumph
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2010
Posts: 122
Location: Israel

PostPosted: Wed Dec 07, 2011 5:55 pm    Post subject: Reply with quote

I just ran /etc/init.d/net.eth0 restart, it does the trick every time, so I figured that was it. :-P

Anyway, the network.target is dead.
Code:

ron $ systemctl status network.target dhcpcd.service
network.target - Network
     Loaded: loaded (/lib/systemd/system/network.target)
     Active: inactive (dead)

dhcpcd.service
     Loaded: error
     Active: inactive (dead)

Both, network.service and dhcpcd.service don't exist apparently, but they do show up in systemadm.
Code:

root # systemctl start network.service
Failed to issue method call: Unit network.service failed to load: No such file or directory. See system logs and 'systemctl status' for details.
root # systemctl start dhcpcd.service
Failed to issue method call: Unit dhcpcd.service failed to load: No such file or directory. See system logs and 'systemctl status' for details.

What do I do?
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Wed Dec 07, 2011 6:29 pm    Post subject: Reply with quote

idk, install dhcpcd perhaps?
Back to top
View user's profile Send private message
Galumph
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jul 2010
Posts: 122
Location: Israel

PostPosted: Wed Dec 07, 2011 9:20 pm    Post subject: Reply with quote

I have dhcpcd installed, it's just I could never get internet connection working without a static IP.
Code:

root # emerge --pretend dhcpcd

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] net-misc/dhcpcd-5.2.12

Can someone point me to a manual for systemd? The man page is nothing special. Instructions on setting up/writing my own services would be godsend.
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Wed Dec 07, 2011 10:15 pm    Post subject: Reply with quote

Galumph wrote:
The man page is nothing special.

systemd comes with by far more that one manpage :wink: Anything you need should be there. You should be particularly interested in "systemd.unit" manpage and "systemd.service".

This should also be useful: http://0pointer.de/blog/projects/systemd-for-admins-3.html

Also, despite popular preconceptions, you can use service files to launch shell scripts, if needed.
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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