On Mon, 28 Jul 2025 at 17:31, Andrew Bower <[email protected]> wrote:

> I think we should do this:
>
> Remove sd_booted() check
> if sd_get_sessions()
>   < 0 && != ENOENT: error
>   > 0: show sessions
>   default: fallback to utmp
>
> This should deal with:
>   1. systemd and elogind with some login sessions: show sessions
>   2. neither systemd nor elogind: fallback to utmp reading
>   3. systemd and elogind with no sessions: show nothing, as now, but via
>      fallback utmp route with no practical difference.
>
> I don't see a downside from this approach.
>
I think this is the correct way too. I'll double check that 0 user path
because it looks odd, but its probably doing the right thing.

 - Craig

Reply via email to