From: William Hubbs <williamh@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] rfc: OpenRC network provides revisited
Date: Sat, 25 Aug 2012 15:16:28 -0500 [thread overview]
Message-ID: <20120825201628.GA4199@linux1> (raw)
In-Reply-To: <50391E43.7000409@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 2771 bytes --]
On Sat, Aug 25, 2012 at 02:49:39PM -0400, Ian Stakenvicius wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 25/08/12 11:53 AM, William Hubbs wrote:
> > On Sat, Aug 25, 2012 at 03:19:24PM +0900, heroxbd@gentoo.org
> > wrote:
> >> If we set rc_provide="net" in rc.conf, the services that need net
> >> can be tricked as we intended to.
>
> This makes more sense to me as it's in the direction that seems more
> logical -- make "net" be provided instantly, rather than forcibly
> changing the dependency on each (or all) "net"-using service(s).
But your words bring us back to the issue I am considering anyway. I
think we should change services that have "need net" in their depends to
something like "use net; after net". "use net" tries to start a "net"
service if one is in the runlevel and none are already started. Using
"after net" makes sure that the service goes down before any net
services.
That way, if someone removes all net-providing services from their
runlevels, services like sshd would still start. Also, if there are
net-providing services in the runlevels, it would attempt to start them
before sshd.
The bottom line here is: I don't think all of the services we have set
up to "need net" in their default configuration should be set up that
way. It would make OpenRC work out of the box for many more
configurations.
> rc_modules_provide="net" ? rc_localmount_provide="net" ? There are a
> number of required services that could be used to assign "net" to..
rc_[service]_provide="net" imo is the best way to do this if you are
putting the variable in rc.conf. That format just says that the one
particular service provides net. On the other hand, if you use
rc_provide="net" in rc.conf, you are saying that *all* services on your
system and any new services you install later provide net.
> (And i would think that this specification should occur in rc.conf
> rather than a file in /etc/conf.d , simply because it's something (in
> the case of NFS root, etc) that's akin to rc_depend_strict or rc_sys
> in terms of its impact on the whole openrc configuration)
This is really more an idiology thing I guess, but I think if you are
tweeking a specific service it should be done in the /etc/conf.d/service
file. To follow the example above, to make a particular service provide
net, it is better imo to put rc_provide="net" in /etc/conf.d/service.
If you want to change this in rc.conf, use the rc_[service]_[depend]
variable instead of rc_[depend]. RC_[depend] in rc.conf will apply that
dependency to *all* services on your system, including any new ones that
get installed later, so be absolutely sure you know what you are doing
if you use this.
William
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-08-25 20:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 17:10 [gentoo-dev] rfc: OpenRC network provides revisited William Hubbs
2012-08-24 17:50 ` Alexandre Rostovtsev
2012-08-24 19:58 ` William Hubbs
2012-08-24 21:01 ` Diego Elio Pettenò
2012-08-24 22:19 ` heroxbd
2012-08-25 1:17 ` Ian Stakenvicius
2012-08-25 5:14 ` [gentoo-dev] " Duncan
2012-08-24 22:40 ` [gentoo-dev] " heroxbd
2012-08-24 23:48 ` William Hubbs
2012-08-25 1:22 ` Ian Stakenvicius
2012-08-25 3:57 ` William Hubbs
2012-08-25 4:14 ` Diego Elio Pettenò
2012-08-25 6:19 ` heroxbd
2012-08-25 15:53 ` William Hubbs
2012-08-25 18:49 ` Ian Stakenvicius
2012-08-25 20:16 ` William Hubbs [this message]
2012-08-27 12:42 ` Ian Stakenvicius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120825201628.GA4199@linux1 \
--to=williamh@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox