Fix ordering of UTMP events: reboot, then runlevel

This patch fixes the ordering of UTMP events. The first event that is
expected in /var/run/utmp is reboot, next is the runlevel change to
the configured runlevel, e.g. from S --> 2.

Let the bootmisc plugin handle this, it knows when /var/run/utmp has
been created and is writable.  It is not the eact boot time, but close
enough for most usees.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-08-09 00:12:47 +02:00
1 parent addc21bdf6
commit f8def336d4
3 files changed
+5 -8

No files matched your search

+2
View File
@@ -55,6 +55,8 @@ int utmp_set(int type, int pid, char *user, char *line, char *id)
ut.ut_tv.tv_sec = time(NULL);
setutent();
while (getutent())
;
result = pututline(&ut) ? 0 : 1;;
endutent();