All, I've been pondering for a while why All of OpenRC's network interfaces provide net.
My understanding of the "net" service is that it is there to signal that a generic network connection is active. What I would like to do in OpenRC is change the network scripts so that only the loopback interface provides net. The down side of this approach will be that if a daemon uses a specific ip address in its configuration, or if it binds to a specific address, the user will have to set up the appropriate configuration options in /etc/conf.d. For example, if I setup sshd to use 192.168.10.1 and eth0 has this address, I have to put the following line in /etc/conf.d/sshd: rc_need="net.eth0" One advantage I see of this approach is it will provide a fix for bugs like http://bugs.gentoo.org/show_bug.cgi?id=228973 by requiring users to configure services like this to start after the interface they use is started. Attached to this message you will find the patch I want to apply to OpenRC to make this change. Any thoughts, comments, or suggestions would be helpful. William
From cf57aa084dfa3020c9f0ae1f3a07e2fbf2e588dc Mon Sep 17 00:00:00 2001 From: William Hubbs <willi...@gentoo.org> Date: Mon, 6 Feb 2012 09:24:52 -0600 Subject: [PATCH] Only the loopback interface should provide net --- init.d/net.lo.in | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/init.d/net.lo.in b/init.d/net.lo.in index bf2d848..b3d2b1a 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -20,11 +20,10 @@ depend() need localmount after bootmisc - provide net keyword -jail -prefix -vserver case "${IFACE}" in - lo|lo0);; + lo|lo0) provide net;; *) after net.lo net.lo0 dbus;; esac -- 1.7.3.4
pgpbYPO5ICH5v.pgp
Description: PGP signature