]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: add missing ordering deps for Conflicts= of emergency.service
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Mon, 25 Sep 2017 10:45:03 +0000 (11:45 +0100)
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>
Fri, 29 Sep 2017 16:35:44 +0000 (17:35 +0100)
1. If we exited emergency mode immediately, we don't want to have an
   irreversible stop job still running for syslog.socket.  I _suspect_ that
   can't happen, but let's not waste effort working out exactly why it's
   impossible and not just very improbable.

2. Similarly, it seems undesirable to have rescue.service and
   emergency.service both running with an open FD of /dev/console, for
   however short a period.

units/emergency.service.in
units/syslog.socket

index ddf7d4cbe2e956d5fe6bca643bdafa39c95f2594..9a81fc4da9c45a508a4bc49c8f51cd956398bf8e 100644 (file)
@@ -12,6 +12,7 @@ DefaultDependencies=no
 Conflicts=shutdown.target
 Conflicts=rescue.service
 Before=shutdown.target
+Before=rescue.service
 
 [Service]
 Environment=HOME=/root
index 372e8fcd45a86877d1a3d3a50191463e2c0d2441..43981904ea2674608485f0e2adb4d58696e1ba9e 100644 (file)
@@ -18,6 +18,7 @@ Before=shutdown.target
 
 # Don't try to activate syslog.service if sysinit.target has failed.
 Conflicts=emergency.service
+Before=emergency.service
 
 [Socket]
 ListenDatagram=/run/systemd/journal/syslog