Commit 55f2dca3 authored by Colin Walters's avatar Colin Walters Committed by Lennart Poettering

update-utmp: Don't error out on runlevel updates if utmp doesn't exist

Other parts of the code handle utmp not existing, so let's be
consistent.  At the moment my GNOME-OSTree builds don't have utmp.
parent a1cccad1
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment