</varlistentry>
<varlistentry>
- <term><varname>EnableWallMessages=</varname></term>
+ <term><varname>WallMessages=</varname></term>
<listitem>
+ <!-- NB: the configuration file setting lacks the "Enable" prefix that the dbus property has. It
+ was a mistake to have that prefix, as we generally frown on useless Enable/Disables prefix of
+ configuration knobs. -->
<para>
Controls whether
- <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
- messages should be sent to the terminals of all currently logged in users upon shutdown or
+ <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry> messages
+ should be sent to the terminals of all currently logged in users upon shutdown or
reboot. Defaults to <literal>yes</literal>, and can be changed at runtime via the DBus
<literal>EnableWallMessages</literal> and <literal>WallMessagePrefix</literal> properties.
</para>
(void) fchmod(fileno(f), 0644);
serialize_usec(f, "USEC", m->scheduled_shutdown_timeout);
- serialize_item_format(f, "WARN_WALL", "%s", one_zero(m->enable_wall_messages));
+ serialize_item_format(f, "WARN_WALL", "%s", one_zero(m->wall_messages));
serialize_item_format(f, "MODE", "%s", handle_action_to_string(m->scheduled_shutdown_action));
serialize_item_format(f, "UID", UID_FMT, m->scheduled_shutdown_uid);
if (r < 0)
log_debug_errno(r, "Failed to parse enabling wall messages");
else
- m->enable_wall_messages = r;
+ m->wall_messages = r;
}
if (wall_message) {
if (r == 0)
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
- if (m->enable_wall_messages) {
+ if (m->wall_messages) {
_cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL;
const char *tty = NULL;
uid_t uid = 0;
/* Short-circuit the operation if the desired state is already in place, to
* avoid an unnecessary polkit permission check. */
if (streq_ptr(m->wall_message, empty_to_null(wall_message)) &&
- m->enable_wall_messages == enable_wall_messages)
+ m->wall_messages == enable_wall_messages)
goto done;
r = bus_verify_polkit_async(
if (r < 0)
return log_oom();
- m->enable_wall_messages = enable_wall_messages;
+ m->wall_messages = enable_wall_messages;
done:
return sd_bus_reply_method_return(message, NULL);
static const sd_bus_vtable manager_vtable[] = {
SD_BUS_VTABLE_START(0),
- SD_BUS_WRITABLE_PROPERTY("EnableWallMessages", "b", bus_property_get_bool, bus_property_set_bool, offsetof(Manager, enable_wall_messages), 0),
+ SD_BUS_WRITABLE_PROPERTY("EnableWallMessages", "b", bus_property_get_bool, bus_property_set_bool, offsetof(Manager, wall_messages), 0),
SD_BUS_WRITABLE_PROPERTY("WallMessage", "s", NULL, NULL, offsetof(Manager, wall_message), 0),
SD_BUS_PROPERTY("NAutoVTs", "u", NULL, offsetof(Manager, n_autovts), SD_BUS_VTABLE_PROPERTY_CONST),
Login.DesignatedMaintenanceTime, config_parse_calendar, 0, offsetof(Manager, maintenance_time)
Login.UserTasksMax, config_parse_compat_user_tasks_max, 0, 0
Login.StopIdleSessionSec, config_parse_sec_fix_0, 0, offsetof(Manager, stop_idle_session_usec)
-Login.EnableWallMessages, config_parse_bool, 0, offsetof(Manager, enable_wall_messages)
+Login.WallMessages, config_parse_bool, 0, offsetof(Manager, wall_messages)