Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] Where is /etc/conf.d/net.example?

269 views
Skip to first unread message

Chris Stankevitz

unread,
Mar 16, 2014, 2:30:01 PM3/16/14
to
Where is the proper place to specify the gentoo network configuration nowadays?

I do not have a file called /etc/conf.d/net.example on my hard drive.
That surprised me.

The handbook talks all about eth0, but my machine does not have a
eth0. It has eno1. Perhaps the handbook is not up to date?

I'm using wicd now but I want to ditch wicd and replace it with the
"generally accepted correct gentoo way".

Thank you,

Chris

Alon Bar-Lev

unread,
Mar 16, 2014, 2:30:01 PM3/16/14
to

/usr/share/doc/netifrc-0.1/net.example.bz2

Alexander Kapshuk

unread,
Mar 16, 2014, 3:30:01 PM3/16/14
to
As far as eth0 goes, the handbook does talk about network interface
names other than eth0. See below for details.


http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&full=1#book_part1_chap3

Automatically Start Networking at Boot

To have your network interfaces activated at boot, you need to add them
to the default runlevel.

Code Listing 2.7: Adding net.eth0 to the default runlevel

# cd /etc/init.d
# ln -s net.lo net.eth0
# rc-update add net.eth0 default

If you have several network interfaces, you need to create the
appropriate net.* files just like you did with net.eth0.

If you later find out the assumption about the network interface name
(which we currently document as eth0) was wrong, then

1. update the /etc/conf.d/net file with the correct interface name
(like enp3s0 instead of eth0),
2. create new symbolic link (like /etc/init.d/net.enp3s0),
3. remove the old symbolic link (rm /etc/init.d/net.eth0),
4. add the new one to the default runlevel, and
5. remove the old one using rc-update del net.eth0 default.

Alan McKinnon

unread,
Mar 16, 2014, 4:20:02 PM3/16/14
to
On 16/03/2014 20:27, Chris Stankevitz wrote:


[snip]


> I'm using wicd now but I want to ditch wicd and replace it with the
> "generally accepted correct gentoo way".
>
> Thank you,
>
> Chris
>
>
>


There is no "generally accepted correct gentoo way", there is only
whatever you feel like using.

You have various choices

- an orthodox network manager like wicd or nm
- a minimal network manager like connman
- /etc/init.d/net* scripts supplied by OpenRc
- no manager, do it manually

OpenRc is the default for no real reason other than it is and has been
for some time. It can also be gotten to work in every case known to man,
the same can't be said for the other options.

If you want to ditch wicd because you think it's not the supported or
approved way, you might want to revisit that choice

--
Alan McKinnon
alan.m...@gmail.com

Mick

unread,
Mar 16, 2014, 7:30:02 PM3/16/14
to
On Sunday 16 Mar 2014 18:27:45 Chris Stankevitz wrote:
> Where is the proper place to specify the gentoo network configuration
> nowadays?
>
> I do not have a file called /etc/conf.d/net.example on my hard drive.
> That surprised me.

There used to be a /etc/conf.d/net.example, but that stopped some way back
since sys-apps/openrc-0.12.4 I seem to recall. I never understood why. Since
then every new openrc version updates its net.example file, but instead of
doing so in /etc/conf.d/, it does it in /usr/share/doc/netifrc*/

BTW, this is the "gentoo way" only insofar that gentoo happens to use openrc.
If wicd, networkmanager, connman suit your needs, there's no obligation to use
openrc's scripts.

--
Regards,
Mick
signature.asc

eroen

unread,
Mar 16, 2014, 11:30:01 PM3/16/14
to
On Sun, 16 Mar 2014 22:15:59 +0200, Alan McKinnon
<alan.m...@gmail.com> wrote:
> You have various choices
>
> - an orthodox network manager like wicd or nm
> - a minimal network manager like connman
> - /etc/init.d/net* scripts supplied by OpenRc
> - no manager, do it manually
>

Why doesn't anyone ever mention using dhcpcd for managing connections?
It and its accompanying openrc init script are installed on almost
every gentoo box anyway. For simple setups it should Just Work(TM)
out-of-box.

--
eroen
signature.asc

Mick

unread,
Mar 17, 2014, 9:00:01 AM3/17/14
to
I can't find an /etc/conf.d/dhcpcd file. Will it use the /etc/conf.d/net file
settings, or just try to bring up all and any /etc/init.d/net.* symlinks and
get an IP address from any listening dhcp server?

--
Regards,
Mick
signature.asc

Alan McKinnon

unread,
Mar 17, 2014, 9:20:01 AM3/17/14
to
I haven't used dhcpcd for a some years now, so YMMV:

It doesn't have an init script, it's started by OpenRc's net.* scripts.
If they are blank, OpenRc assumes a dhcp-managed interface and starts
the configured dhcp provider. dhcpcd is the default for this.

So, if you create /etc/init.d/net.eth0[1] and add nothing to
/etc/conf.d/net, dhcpcd is most ikely what you are going to be running.

[1] For the purposes of this thread, let's just assume that udev's
naming-shenanigans don't exist, we all know what we mean by "eth0"

--
Alan McKinnon
alan.m...@gmail.com

Nilesh Govindrajan

unread,
Mar 17, 2014, 9:50:01 AM3/17/14
to
/etc/init.d/dhcpcd is created when you install the package.
If dhcpcd is not present, I think OpenRC uses busybox's udhcpc (which
is generally compiled with busybox and busybox is present on all
Gentoo systems).
0 new messages