]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
getty@.service.m4: add Conflicts=/Before= against rescue.service (#3792)
authorMichal Soltys <soltys@ziu.info>
Mon, 25 Jul 2016 14:18:00 +0000 (16:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Jul 2016 14:18:00 +0000 (16:18 +0200)
If user isolates rescue target from multi-user or graphical target (or just
starts the service), IgnoreOnIsolate will cause issues with sulogin which is
directly started on current virtual console. This patch adds necessary
Conflicts= and Before= against rescue.service.

Note that this is not needed for emergency target, as implicit Requires= and
After= against sysinit.target is in effect for this service
(DefaultDependencies=yes).

units/getty@.service.m4

index 46164ab9d809ee848bc92c82a708ccffc262ec74..5b82c13fc5eb08a979625353bf7bbf0509399198 100644 (file)
@@ -20,6 +20,12 @@ After=rc-local.service
 Before=getty.target
 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
+
 # On systems without virtual consoles, don't start any getty. Note
 # that serial gettys are covered by serial-getty@.service, not this
 # unit.