From dbc9830cde21afb585e4e28eafc0230cc0933563 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 8 Mar 2018 11:57:59 +0100 Subject: [PATCH] systemctl: honour --dry-run also on logind calls Fixes #7670. --- src/systemctl/systemctl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 393c35c60fe..6ae97cf1076 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2915,8 +2915,8 @@ static int start_unit_one( return log_error_errno(r, "Failed to request match for PropertiesChanged signal: %m"); } - log_debug("%s manager for %s on %s, %s", - arg_dry_run ? "Would call" : "Calling", + log_debug("%s dbus call org.freedesktop.systemd1.Manager %s(%s, %s)", + arg_dry_run ? "Would execute" : "Executing", method, name, mode); if (arg_dry_run) return 0; @@ -3215,6 +3215,10 @@ static int logind_set_wall_message(void) { if (!m) return log_oom(); + log_debug("%s wall message \"%s\".", arg_dry_run ? "Would set" : "Setting", m); + if (arg_dry_run) + return 0; + r = sd_bus_call_method( bus, "org.freedesktop.login1", @@ -3285,6 +3289,10 @@ static int logind_reboot(enum action a) { polkit_agent_open_maybe(); (void) logind_set_wall_message(); + log_debug("%s org.freedesktop.login1.Manager %s dbus call.", arg_dry_run ? "Would execute" : "Executing", method); + if (arg_dry_run) + return 0; + r = sd_bus_call_method( bus, "org.freedesktop.login1", -- 2.47.3