From: Sven Eden Date: Wed, 28 Jun 2017 05:49:45 +0000 (+0200) Subject: Prep v231.2: Do not set a wall message when suspending (none there anyway) X-Git-Tag: v231.3~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=47ae1c82f5cbb9ad3876962c39d21b1b13cff101;p=elogind.git Prep v231.2: Do not set a wall message when suspending (none there anyway) --- 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 */