Gentoo Archives: gentoo-user

From: Jack <ostroffjh@×××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Question about runlevels.
Date: Thu, 18 Mar 2021 18:52:55
Message-Id: SMTPBTNW.AC72BSQG.JWJOFW4C@KDRTA6FP.4Y6LJAPV.TOIZ7EM3
In Reply to: [gentoo-user] Question about runlevels. by Grant Taylor
1 On 2021.03.18 14:36, Grant Taylor wrote:
2 > Hi,
3 >
4 > Do services started in the "boot" runlevel continue to run in the
5 > "default" runlevel?
6 >
7 > Or do they get stopped as part of transitioning from the "boot"
8 > runlevel to the "default" runlevel? (Or any other runlevel that
9 > doesn't include the service.
10 >
11 > I'm wondering about having two things that are very similar (as in
12 > use the same ports), but distinctly different (different
13 > configurations) with the following:
14 >
15 > myService-boot | boot
16 > myService-default | default
17 >
18 > Will myService-boot start and run during boot, then stop when the
19 > system goes into the default runlevel?
20 >
21 > My expectation is that OpenRC will (try to) start myService-default
22 > when the system enters the default runlevel. But it will fail if
23 > myService-boot is still running.
24 That is my expectation. I don't see any automatic stopping of
25 services. Even the services in the shutdown runlevel get started -
26 even though their starting is actually stopping other stuff.
27
28 Do an rc-status (you might need to explicitly do "rc-status boot") and
29 see all the boot runlevel services are still running (unless you
30 explicitly stopped them.) Can you explicitly set up myService-default
31 to explicitly check if myService-boot is running, and if so, stop it
32 before starting itself?
33
34 Jack