From 47ae1c82f5cbb9ad3876962c39d21b1b13cff101 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Wed, 28 Jun 2017 07:49:45 +0200 Subject: [PATCH] Prep v231.2: Do not set a wall message when suspending (none there anyway) --- src/login/eloginctl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/login/eloginctl.c b/src/login/eloginctl.c index 0b4dc84b4..dd0a89d38 100644 --- a/src/login/eloginctl.c +++ b/src/login/eloginctl.c @@ -299,12 +299,15 @@ static int elogind_reboot(sd_bus *bus, enum elogind_action a) { } polkit_agent_open_if_enabled(); - r = elogind_set_wall_message(bus, table[a]); - if (r < 0) { - log_warning_errno(r, "Failed to set wall message, ignoring: %s", - bus_error_message(&error, r)); - sd_bus_error_free(&error); + if ( IN_SET(a, ACTION_POWEROFF, ACTION_REBOOT) ) { + r = elogind_set_wall_message(bus, table[a]); + + if (r < 0) { + log_warning_errno(r, "Failed to set wall message, ignoring: %s", + bus_error_message(&error, r)); + sd_bus_error_free(&error); + } } /* Now call elogind itself to request the operation */ -- 2.30.2