[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    Re: [gentoo-user] Question about runlevels.
From:       Grant Taylor <gtaylor () gentoo ! tnetconsulting ! net>
Date:       2021-03-18 20:13:49
Message-ID: e194bf93-b21c-fe1d-a45c-d995882eecff () spamtrap ! tnetconsulting ! net
[Download RAW message or body]

On 3/18/21 12:54 PM, Victor Ivanov wrote:
> Yes

Okay.

> Generally yes, when changing from one runlevel to another OpenRC will 
> stop all services from the previous (current) runlevel and start the 
> services for the next (new) runlevel.

Good.

> However, my understanding is that the `boot' and `sysinit' runlevels are 
> "special" and services started there are also included in all 
> "non-special" runlevels.

Ah.

> In your case, `myService-boot' should remain active in `default' along 
> with `myService-default'. You can double check that by running
> 
>       $ rc-status

Hum.

I'm not seeing any overlap between services in the boot runlevel and 
services still running in the default runlevel.

cat <(rc-status | egrep "^ " | sort | awk '{print $1}') <(rc-update | 
grep boot | awk '{print $1}' | sort) | sort | uniq -c

All the services are listed one time.

If any of the boot services are still running as a default service, I 
would expect their count to be two.

> It's difficult to say without understanding what they do and their end 
> goal. It also depends on how the services are coded. If they try to bind 
> to the same port then yes, chances are that `myService-default' will 
> fail at this point as the former would still be running.

It doesn't really matter.

My question was about a boot service continuing to run in the default 
runlevel or not.  It doesn't matter what myService-boot and 
myService-default are.  They could be zfs-mount and sshd.

I'm only interested in if myService-boot continues to run in the default 
runlevel or not.

myService-boot    | boot
myService-default |      default

> If that's the case, one option is to separate their responsibilities 
> and/or make `myService-default' depend on `myService-boot' and have it 
> leverage whatever it is that `myService-boot' already provides.

Immaterial.



-- 
Grant. . . .
unix || die

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic