OpenRC: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== | == Installation == | ||
{{Root|emerge baselayout openrc --oneshot}} | |||
{{ | |||
== Configuration == | == Configuration == | ||
Merge your configs first: | Merge your configs first: | ||
{{ | {{Root|etc-update}} | ||
Create a new symlink for your eth0, else your network won't be available after reboot: | Create a new symlink for your eth0, else your network won't be available after reboot: | ||
{{ | {{Root|cd /etc/init.d}} | ||
{{ | {{Root|ln -s net.lo net.eth0}} | ||
Now edit /etc/conf.d/net, you'll find your old config in /etc/conf.d/net.eth0 but note that the syntax has changed so don't copy & paste. To set eth0 to a static IP you'll need something like this: | Now edit /etc/conf.d/net, you'll find your old config in /etc/conf.d/net.eth0 but note that the syntax has changed so don't copy & paste. To set eth0 to a static IP you'll need something like this: | ||
{{ | |||
{{File|/etc/conf.d/net| | |||
<pre> | <pre> | ||
config_eth0="192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" | config_eth0="192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" | ||
| Line 28: | Line 22: | ||
</pre> | </pre> | ||
}} | }} | ||
Latest revision as of 13:49, 4 May 2012
Installation
# emerge baselayout openrc --oneshot
Configuration
Merge your configs first:
# etc-update
Create a new symlink for your eth0, else your network won't be available after reboot:
# cd /etc/init.d
# ln -s net.lo net.eth0
Now edit /etc/conf.d/net, you'll find your old config in /etc/conf.d/net.eth0 but note that the syntax has changed so don't copy & paste. To set eth0 to a static IP you'll need something like this:
File: /etc/conf.d/net
config_eth0="192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" routes_eth0="default via 192.168.0.1"