View previous topic :: View next topic |
Author |
Message |
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Wed Dec 07, 2011 2:49 pm Post subject: systemd no internet connection |
|
|
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 |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1932
|
Posted: Wed Dec 07, 2011 2:59 pm Post subject: |
|
|
How do you manage to restart net.eth0 if OpenRC is not running?
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 |
|
|
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Wed Dec 07, 2011 5:55 pm Post subject: |
|
|
I just ran /etc/init.d/net.eth0 restart, it does the trick every time, so I figured that was it.
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 |
|
|
Dr.Willy Guru
Joined: 15 Jul 2007 Posts: 547 Location: NRW, Germany
|
Posted: Wed Dec 07, 2011 6:29 pm Post subject: |
|
|
idk, install dhcpcd perhaps? |
|
Back to top |
|
|
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Wed Dec 07, 2011 9:20 pm Post subject: |
|
|
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 |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1932
|
Posted: Wed Dec 07, 2011 10:15 pm Post subject: |
|
|
Galumph wrote: | The man page is nothing special. |
systemd comes with by far more that one manpage 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 |
|
|
|