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:
Colin Walters
2012-09-13 17:17:32 +02:00
committed by Lennart Poettering
parent a1cccad1fe
commit 55f2dca329
+4 -2
View File
@@ -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;