From 9830d716147c4e35026457027af95f303e690ae9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 8 Nov 2021 23:08:13 +0100 Subject: [PATCH] logind: downgrade message about /run/utmp missing to LOG_DEBUG This isn't really anything to really complain about, let's debug log about this, and continue quietly as if utmp was empty. --- src/login/logind-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/login/logind-core.c b/src/login/logind-core.c index 57d2d64e494..254a1a69fb6 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -721,7 +721,9 @@ int manager_read_utmp(Manager *m) { errno = 0; u = getutxent(); if (!u) { - if (errno != 0) + if (errno == ENOENT) + log_debug_errno(errno, _PATH_UTMPX " does not exist, ignoring."); + else if (errno != 0) log_warning_errno(errno, "Failed to read " _PATH_UTMPX ", ignoring: %m"); return 0; } -- 2.47.3