diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-06-28 07:49:45 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-06-28 07:49:45 +0200 |
commit | 47ae1c82f5cbb9ad3876962c39d21b1b13cff101 (patch) | |
tree | 82b8aedfb3e830768e79487075e75483ef55dea3 | |
parent | 265fbcd7e07db9611f3f482b335add2c7979dca5 (diff) |
Prep v231.2: Do not set a wall message when suspending (none there anyway)
-rw-r--r-- | src/login/eloginctl.c | 13 |
1 files 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 */ |