diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2013-02-15 22:42:26 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2013-02-16 01:18:09 +0100 |
commit | 9d246da3c630559924a0262769c8493fa22c7acc (patch) | |
tree | 4ba7227e8b07f348ee1f50512273a8d42bde457b | |
parent | 80cbda3558c534b575bf5315fa53b0f82dc088ab (diff) |
unit: don't Require systemd-journald.socket from units
It is not really necessary to have a hard requirement dependency on
systemd-journald.socket in almost every unit. The socket gets pulled
into boot via at least two ways:
sockets.target -> systemd-journald.socket
sysinit.target -> systemd-journald.service -> systemd-journald.socket
So just assume something pulled the socket in and drop the automatic
requirement dependencies on it.
"systemctl stop systemd-journald.socket" will now not take the whole
system down with it.
-rw-r--r-- | src/core/unit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 86aaa1509a..3a88996eb7 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -616,9 +616,11 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) { /* If syslog or kernel logging is requested, make sure our own * logging daemon is run first. */ - if (u->manager->running_as == SYSTEMD_SYSTEM) - if ((r = unit_add_two_dependencies_by_name(u, UNIT_REQUIRES, UNIT_AFTER, SPECIAL_JOURNALD_SOCKET, NULL, true)) < 0) + if (u->manager->running_as == SYSTEMD_SYSTEM) { + r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_JOURNALD_SOCKET, NULL, true); + if (r < 0) return r; + } return 0; } |