summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/update-utmp/update-utmp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
index fceeed8b44..67c5788fe7 100644
--- a/src/update-utmp/update-utmp.c
+++ b/src/update-utmp/update-utmp.c
@@ -301,8 +301,10 @@ static int on_runlevel(Context *c) {
#endif
if ((q = utmp_put_runlevel(runlevel, previous)) < 0) {
- log_error("Failed to write utmp record: %s", strerror(-q));
- r = q;
+ if (q != -ESRCH && q != -ENOENT) {
+ log_error("Failed to write utmp record: %s", strerror(-q));
+ r = q;
+ }
}
return r;