1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00

Merge pull request #7871 from sourcejedi/log_mounts

core: fix output (logging) for mount units (#7603)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-01-15 13:34:06 +04:00 committed by GitHub
commit d04e012ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,6 +164,10 @@ static void mount_init(Unit *u) {
assert(u->load_state == UNIT_STUB); assert(u->load_state == UNIT_STUB);
m->timeout_usec = u->manager->default_timeout_start_usec; 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; m->directory_mode = 0755;
/* We need to make sure that /usr/bin/mount is always called /* We need to make sure that /usr/bin/mount is always called
@ -1305,7 +1309,7 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
case MOUNT_UNMOUNTING_SIGKILL: case MOUNT_UNMOUNTING_SIGKILL:
case MOUNT_UNMOUNTING_SIGTERM: case MOUNT_UNMOUNTING_SIGTERM:
if (m->from_proc_self_mountinfo) { if (f == MOUNT_SUCCESS && m->from_proc_self_mountinfo) {
/* Still a mount point? If so, let's try again. Most likely there were multiple mount points /* Still a mount point? If so, let's try again. Most likely there were multiple mount points
* stacked on top of each other. Note that due to the io event priority logic we can be sure * stacked on top of each other. Note that due to the io event priority logic we can be sure
@ -1320,7 +1324,7 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
mount_enter_mounted(m, f); mount_enter_mounted(m, f);
} }
} else } else
mount_enter_dead(m, f); mount_enter_dead_or_mounted(m, f);
break; break;