1 |
On Sat, Aug 25, 2012 at 02:49:39PM -0400, Ian Stakenvicius wrote: |
2 |
> -----BEGIN PGP SIGNED MESSAGE----- |
3 |
> Hash: SHA256 |
4 |
> |
5 |
> On 25/08/12 11:53 AM, William Hubbs wrote: |
6 |
> > On Sat, Aug 25, 2012 at 03:19:24PM +0900, heroxbd@g.o |
7 |
> > wrote: |
8 |
> >> If we set rc_provide="net" in rc.conf, the services that need net |
9 |
> >> can be tricked as we intended to. |
10 |
> |
11 |
> This makes more sense to me as it's in the direction that seems more |
12 |
> logical -- make "net" be provided instantly, rather than forcibly |
13 |
> changing the dependency on each (or all) "net"-using service(s). |
14 |
|
15 |
But your words bring us back to the issue I am considering anyway. I |
16 |
think we should change services that have "need net" in their depends to |
17 |
something like "use net; after net". "use net" tries to start a "net" |
18 |
service if one is in the runlevel and none are already started. Using |
19 |
"after net" makes sure that the service goes down before any net |
20 |
services. |
21 |
|
22 |
That way, if someone removes all net-providing services from their |
23 |
runlevels, services like sshd would still start. Also, if there are |
24 |
net-providing services in the runlevels, it would attempt to start them |
25 |
before sshd. |
26 |
|
27 |
The bottom line here is: I don't think all of the services we have set |
28 |
up to "need net" in their default configuration should be set up that |
29 |
way. It would make OpenRC work out of the box for many more |
30 |
configurations. |
31 |
|
32 |
> rc_modules_provide="net" ? rc_localmount_provide="net" ? There are a |
33 |
> number of required services that could be used to assign "net" to.. |
34 |
|
35 |
rc_[service]_provide="net" imo is the best way to do this if you are |
36 |
putting the variable in rc.conf. That format just says that the one |
37 |
particular service provides net. On the other hand, if you use |
38 |
rc_provide="net" in rc.conf, you are saying that *all* services on your |
39 |
system and any new services you install later provide net. |
40 |
|
41 |
> (And i would think that this specification should occur in rc.conf |
42 |
> rather than a file in /etc/conf.d , simply because it's something (in |
43 |
> the case of NFS root, etc) that's akin to rc_depend_strict or rc_sys |
44 |
> in terms of its impact on the whole openrc configuration) |
45 |
|
46 |
This is really more an idiology thing I guess, but I think if you are |
47 |
tweeking a specific service it should be done in the /etc/conf.d/service |
48 |
file. To follow the example above, to make a particular service provide |
49 |
net, it is better imo to put rc_provide="net" in /etc/conf.d/service. |
50 |
|
51 |
If you want to change this in rc.conf, use the rc_[service]_[depend] |
52 |
variable instead of rc_[depend]. RC_[depend] in rc.conf will apply that |
53 |
dependency to *all* services on your system, including any new ones that |
54 |
get installed later, so be absolutely sure you know what you are doing |
55 |
if you use this. |
56 |
|
57 |
William |