[systemd-devel] multi-user.target -> rescue.target and back to multi-user issues
Michal Soltys
soltys at ziu.info
Wed Jun 22 17:20:03 UTC 2016
On 2016-06-22 13:32, Andrei Borzenkov wrote:
>>
>> Well, depends =) It was easy to do it cleanly, but rarely anyone cared. It's
>
> How is different to what we have now? :)
I guess =)
>
>>> Well, getty's are spawned dynamically on demand and there is no direct
>>> dependency between various targets and running services. So switching
>>> between multi-user and graphical would kill them. That's probably not
>>> what users expect.
>>
>>
>> It wouldn't (and it doesn't).
>
> Did you actually test it?
>
Well, I did but apparently not thoroughly enough (or rather too fast and
my eyes skipped that autovts were actually killed before they got
immediately restarted) - so my bad on this one.
>> There is no conflict between mutli and
>> graphical (graphical even wants/requires multi).
>
> You probably misunderstand what isolate does. It builds closure of
> units and stops everything that is not part of this closure (i.e. any
> unit that is not directly or indirectly Required or Wanted by target).
> Because autovt at ttyX.service (sorry, I meant them not getty) do not
> have any dependency on any target, every running instance is stopped.
> The only exception is getty at tty1.service which is explicitly pulled in
> by getty.target.
>
Yea, I see where I assumed a bit too much. I thought services without
explicit or implicit (DefaultDependencies, etc.) requires/wants but also
without explict conflicts wouldn't be killed.
For the record, it seems that the following workaround works just fine
with getty/autovt:
Conflicts=rescue.service
Maybe it would be worth adding to the service definition (if I haven't
missed any other subtleties) ?
More information about the systemd-devel
mailing list