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`.
This commit is contained in:
parent
aad67b80c5
commit
5804e1b6ff
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue