1 |
On 3/18/21 12:54 PM, Victor Ivanov wrote: |
2 |
> Yes |
3 |
|
4 |
Okay. |
5 |
|
6 |
> Generally yes, when changing from one runlevel to another OpenRC will |
7 |
> stop all services from the previous (current) runlevel and start the |
8 |
> services for the next (new) runlevel. |
9 |
|
10 |
Good. |
11 |
|
12 |
> However, my understanding is that the `boot' and `sysinit' runlevels are |
13 |
> "special" and services started there are also included in all |
14 |
> "non-special" runlevels. |
15 |
|
16 |
Ah. |
17 |
|
18 |
> In your case, `myService-boot' should remain active in `default' along |
19 |
> with `myService-default'. You can double check that by running |
20 |
> |
21 |
> $ rc-status |
22 |
|
23 |
Hum. |
24 |
|
25 |
I'm not seeing any overlap between services in the boot runlevel and |
26 |
services still running in the default runlevel. |
27 |
|
28 |
cat <(rc-status | egrep "^ " | sort | awk '{print $1}') <(rc-update | |
29 |
grep boot | awk '{print $1}' | sort) | sort | uniq -c |
30 |
|
31 |
All the services are listed one time. |
32 |
|
33 |
If any of the boot services are still running as a default service, I |
34 |
would expect their count to be two. |
35 |
|
36 |
> It's difficult to say without understanding what they do and their end |
37 |
> goal. It also depends on how the services are coded. If they try to bind |
38 |
> to the same port then yes, chances are that `myService-default' will |
39 |
> fail at this point as the former would still be running. |
40 |
|
41 |
It doesn't really matter. |
42 |
|
43 |
My question was about a boot service continuing to run in the default |
44 |
runlevel or not. It doesn't matter what myService-boot and |
45 |
myService-default are. They could be zfs-mount and sshd. |
46 |
|
47 |
I'm only interested in if myService-boot continues to run in the default |
48 |
runlevel or not. |
49 |
|
50 |
myService-boot | boot |
51 |
myService-default | default |
52 |
|
53 |
> If that's the case, one option is to separate their responsibilities |
54 |
> and/or make `myService-default' depend on `myService-boot' and have it |
55 |
> leverage whatever it is that `myService-boot' already provides. |
56 |
|
57 |
Immaterial. |
58 |
|
59 |
|
60 |
|
61 |
-- |
62 |
Grant. . . . |
63 |
unix || die |