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.
This commit is contained in:
committed by
Lennart Poettering
parent
a1cccad1fe
commit
55f2dca329
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user