1 |
On Sat, Aug 12, 2017 at 3:35 AM, Matthias Hanft <mh@×××××.de> wrote: |
2 |
> |
3 |
> But now, there's agetty left, and I don't know how to restart this |
4 |
> service (without reboot): |
5 |
> |
6 |
|
7 |
This is because these are run directly by init and not by openrc, |
8 |
unlike all the other daemons on the system. As others pointed out you |
9 |
can just kill these directly. |
10 |
|
11 |
Under systemd agetty is run as a service just like everything else and |
12 |
you can restart it the same way that you'd restart apache. There |
13 |
isn't really any equivalent to inittab in systemd other than one or |
14 |
two similar global settings. |
15 |
|
16 |
Arguably it might be nicer to treat them more like a normal service |
17 |
under openrc, now that it can restart crashed services. I'm not sure |
18 |
how reliable this feature is (I haven't run openrc in a while now), |
19 |
and you would need it to be reliable for agetty since most people like |
20 |
having a console. Traditionally agetty has been run by init for a |
21 |
long time though, so there might be some reluctance to make this |
22 |
change. Offhand I'm not sure if there are any other issues with |
23 |
making it a service in openrc. |
24 |
|
25 |
Fun fact: sysvinit is essentially a poor man's service manager. You |
26 |
could stick anything in inittab and init will start it, and restart it |
27 |
if it dies. There is just no control over things like dependencies |
28 |
and sequencing, and you have to watch out because if you have init run |
29 |
some bash script, which launches a process that forks, and your script |
30 |
terminates, then init will re-launch it possibly giving you a fork |
31 |
bomb at boot. Things like this are why more full-featured service |
32 |
managers were created. Even these tend to fall in generations, with |
33 |
openrc being a lot more modern than what most distros were using |
34 |
before upstart/runit/systemd came along. |
35 |
|
36 |
-- |
37 |
Rich |