diff options
author | Alan Jenkins <alan.christopher.jenkins@gmail.com> | 2017-09-29 18:20:31 +0200 |
---|---|---|
committer | Alan Jenkins <alan.christopher.jenkins@gmail.com> | 2017-09-29 18:34:55 +0200 |
commit | 950d8fcdd9aa7e71ad32ea224e7d6fbe0f9f53de (patch) | |
tree | 075da5e438f5a04aa307c3421fff98d35eb71853 /units | |
parent | units: do not kill rescue shell when machines.target is started (diff) | |
download | systemd-950d8fcdd9aa7e71ad32ea224e7d6fbe0f9f53de.tar.xz systemd-950d8fcdd9aa7e71ad32ea224e7d6fbe0f9f53de.zip |
units: express Conflict in syslog.socket instead of emergency.service
Note this commit only changes how the code is expressed; it does not change
the existence of any dependency.
The `Conflicts=` was added in 3136ec90, "Stop syslog.socket when entering
emergency mode". The discussion in the issue #266 raised concerns that
this might be needed for other units, but failed to point out why
syslog.socket is special. The reason is that syslog.socket has
DefaultDepedencies=no, so it does not get Requires=sysinit.target like
other socket units do. But syslog.service does require sysinit.target,
among other things.
We don't have many socket, path, or timer units with
DefaultDependencies=no, and I don't think any of the triggered services
have such additional hard dependencies as syslog.service does.
It is much less confusing if we keep this `Conflicts=` in the same file as
the `DefaultDependencies=no` which made it necessary.
Diffstat (limited to '')
-rw-r--r-- | units/emergency.service.in | 1 | ||||
-rw-r--r-- | units/syslog.socket | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/units/emergency.service.in b/units/emergency.service.in index c60fd6e256..ddf7d4cbe2 100644 --- a/units/emergency.service.in +++ b/units/emergency.service.in @@ -11,7 +11,6 @@ Documentation=man:sulogin(8) DefaultDependencies=no Conflicts=shutdown.target Conflicts=rescue.service -Conflicts=syslog.socket Before=shutdown.target [Service] diff --git a/units/syslog.socket b/units/syslog.socket index d3987cb9a8..372e8fcd45 100644 --- a/units/syslog.socket +++ b/units/syslog.socket @@ -10,10 +10,14 @@ Description=Syslog Socket Documentation=man:systemd.special(7) Documentation=https://www.freedesktop.org/wiki/Software/systemd/syslog DefaultDependencies=no -Before=sockets.target shutdown.target +Before=sockets.target # Don't allow logging until the very end Conflicts=shutdown.target +Before=shutdown.target + +# Don't try to activate syslog.service if sysinit.target has failed. +Conflicts=emergency.service [Socket] ListenDatagram=/run/systemd/journal/syslog |