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