diff --git a/units/container-getty@.service.m4.in b/units/container-getty@.service.m4.in index 4b822f0e3b..3d287b9491 100644 --- a/units/container-getty@.service.m4.in +++ b/units/container-getty@.service.m4.in @@ -19,8 +19,8 @@ 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 +Conflicts=rescue.service emergency.service +Before=rescue.service emergency.service [Service] # The '-o' option value tells agetty to replace 'login' arguments with an diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 index ff1b3c3d87..c2665e3f6b 100644 --- a/units/getty@.service.m4 +++ b/units/getty@.service.m4 @@ -23,8 +23,8 @@ IgnoreOnIsolate=yes # IgnoreOnIsolate causes issues with sulogin, if someone isolates # rescue.target or starts rescue.service from multi-user.target or # graphical.target. -Conflicts=rescue.service -Before=rescue.service +Conflicts=rescue.service emergency.service +Before=rescue.service emergency.service # On systems without virtual consoles, don't start any getty. Note # that serial gettys are covered by serial-getty@.service, not this diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 index e56f47652c..d6da914454 100644 --- a/units/serial-getty@.service.m4 +++ b/units/serial-getty@.service.m4 @@ -24,8 +24,8 @@ IgnoreOnIsolate=yes # IgnoreOnIsolate causes issues with sulogin, if someone isolates # rescue.target or starts rescue.service from multi-user.target or # graphical.target. -Conflicts=rescue.service -Before=rescue.service +Conflicts=rescue.service emergency.service +Before=rescue.service emergency.service [Service] # The '-o' option value tells agetty to replace 'login' arguments with an diff --git a/units/sysinit.target b/units/sysinit.target index ec33503330..8d01cbdc1b 100644 --- a/units/sysinit.target +++ b/units/sysinit.target @@ -8,6 +8,13 @@ [Unit] Description=System Initialization Documentation=man:systemd.special(7) -Conflicts=emergency.service emergency.target -Wants=local-fs.target swap.target -After=local-fs.target swap.target emergency.service emergency.target +Wants=swap.target local-fs.target +After=swap.target local-fs.target + +# local-fs.target uses OnFailure="emergency.target" to start an emergency +# shell. In that case we also need to cancel everything that relies on +# local-fs.target. Flooding the screen with yellow [DEPEND] failures would +# be unhelpful. Therefore we break the chain here. We use a Wants +# dependency instead of Requires, and use a Conflict with emergency.target, +# so that we are cancelled without actually failing any more units. +Conflicts=emergency.target