summaryrefslogtreecommitdiffstats
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>2018-01-13 13:30:43 +0100
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>2018-01-13 14:03:13 +0100
commit5804e1b6ff2d871500f9bc205e6fa28d4e984961 (patch)
tree5651432a3c0811907582fb4219cacc0f7763e370 /src/core/mount.c
parentdbus-execute: define bus_set_transient_errno() only if HAVE_SECCOMP (#7869) (diff)
downloadsystemd-5804e1b6ff2d871500f9bc205e6fa28d4e984961.tar.xz
systemd-5804e1b6ff2d871500f9bc205e6fa28d4e984961.zip
core: fix output (logging) for mount units (#7603)
Documentation - systemd.exec - strongly implies mount units get logging. It is safe for mounts to depend on systemd-journald.socket. There is no cyclic dependency generated. This is because the root, -.mount, was already deliberately set to EXEC_OUTPUT_NULL. See comment in mount_load_root_mount(). And /run is excluded from being a mount unit. Nor does systemd-journald depend on /var. It starts earlier, initially logging to /run. Tested before/after using `systemctl stop tmp.mount`.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 9367869f78..9b0b29bff9 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -164,6 +164,10 @@ static void mount_init(Unit *u) {
assert(u->load_state == UNIT_STUB);
m->timeout_usec = u->manager->default_timeout_start_usec;
+
+ m->exec_context.std_output = u->manager->default_std_output;
+ m->exec_context.std_error = u->manager->default_std_error;
+
m->directory_mode = 0755;
/* We need to make sure that /usr/bin/mount is always called