From: Alan Jenkins Date: Mon, 7 Aug 2017 18:24:32 +0000 (+0100) Subject: units: add Conflicts=rescue.service to container-getty@.service X-Git-Tag: v235~244^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d32465fb416f117021151e62977865b4bab1d05a;p=thirdparty%2Fsystemd.git units: add Conflicts=rescue.service to container-getty@.service The traditional runlevel 1 is "single user mode", and shuts down all but the main console. In systemd, rescue.target provides runlevel1.target. But it did not shut down logins on secondary consoles... if systemd was running in a container. I don't think we strictly need to change this. But when you look at both container-getty@.service and getty@.service, you see that both have IgnoreOnIsolate, but only the latter has Conflicts=rescue.service. This also makes rescue.target in a container consistent with emergency.target. In the latter case, the gettys were already stopped, because they have a Requires dependency on sysinit.target. --- diff --git a/units/container-getty@.service.m4.in b/units/container-getty@.service.m4.in index c11daab3675..005d9e5c245 100644 --- a/units/container-getty@.service.m4.in +++ b/units/container-getty@.service.m4.in @@ -17,6 +17,11 @@ Before=getty.target IgnoreOnIsolate=yes ConditionPathExists=/dev/pts/%I +# IgnoreOnIsolate is an issue: when someone isolates rescue.target, +# tradition expects that we shut down all but the main console. +Conflicts=rescue.service +Before=rescue.service + [Service] # The '-o' option value tells agetty to replace 'login' arguments with an # option to preserve environment (-p), followed by '--' for safety, and then