shared/wall: use logind if build without utmp support
If systemd is build without utmp support, use sd_get_sessions() in utmp_wall() to get a list of logged in users with the corresponding tty.
This commit is contained in:
committed by
Luca Boccassi
parent
468018703c
commit
53c0397b1d
@@ -6,7 +6,7 @@
|
||||
#include "journald-wall.h"
|
||||
#include "process-util.h"
|
||||
#include "string-util.h"
|
||||
#include "utmp-wtmp.h"
|
||||
#include "wall.h"
|
||||
|
||||
void server_forward_wall(
|
||||
Server *s,
|
||||
@@ -48,7 +48,7 @@ void server_forward_wall(
|
||||
} else
|
||||
l = message;
|
||||
|
||||
r = utmp_wall(l, "systemd-journald", NULL, NULL, NULL);
|
||||
r = wall(l, "systemd-journald", NULL, NULL, NULL);
|
||||
if (r < 0)
|
||||
log_debug_errno(r, "Failed to send wall message: %m");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user