From 995c5e96cdf9e6054a4df04960253d897f4d7cc2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 14 Oct 2015 16:22:22 +0200 Subject: [PATCH 1/3] core: log if the service to activate vanished before we activate it Normally this shouldn't happen unless the daemon is reloaded. A similar check is already in place in socket.c for the socket activation case. This hopefully makes #1526 non-fatal, though it will not fix this, and there's something else to fix. --- src/core/busname.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/busname.c b/src/core/busname.c index 38becfc119..b85fce5f8d 100644 --- a/src/core/busname.c +++ b/src/core/busname.c @@ -585,6 +585,12 @@ static void busname_enter_running(BusName *n) { } if (!pending) { + if (!UNIT_ISSET(n->service)) { + log_unit_error(UNIT(n), "Service to activate vanished, refusing activation."); + r = -ENOENT; + goto fail; + } + r = manager_add_job(UNIT(n)->manager, JOB_START, UNIT_DEREF(n->service), JOB_REPLACE, true, &error, NULL); if (r < 0) goto fail; From 2ee4e222ff4d14436c00d681c8273384dea690bf Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 14 Oct 2015 16:24:25 +0200 Subject: [PATCH 2/3] tty-ask-password-agent: don't warn if we cannot disable wall messages on the calling tty For example, due to perm issues. THis simply downgrades the message about it, since this is purely cosmetical anyway. Fixes #1543. --- src/tty-ask-password-agent/tty-ask-password-agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 93cce186f0..53986babae 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -381,7 +381,7 @@ static int wall_tty_block(void) { fd = open(p, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY); if (fd < 0) - return log_error_errno(errno, "Failed to open %s: %m", p); + return log_debug_errno(errno, "Failed to open %s: %m", p); return fd; } From be3270ebd3634e3e5c489733dc022c91bf45fba7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 14 Oct 2015 16:25:23 +0200 Subject: [PATCH 3/3] unit: remove [Install] section from the user exit.target unit There's no concept of ctrl-alt-del for user systemd instances, hence don't suggest it woud make sense to symlink the unit to it. Fixes #1525. --- units/user/exit.target | 3 --- 1 file changed, 3 deletions(-) diff --git a/units/user/exit.target b/units/user/exit.target index b0ad24c488..e8148b78c7 100644 --- a/units/user/exit.target +++ b/units/user/exit.target @@ -12,6 +12,3 @@ DefaultDependencies=no Requires=systemd-exit.service After=systemd-exit.service AllowIsolate=yes - -[Install] -Alias=ctrl-alt-del.target