mirror of
https://github.com/troglobit/finit.git
synced 2026-10-23 11:44:37 +00:00
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:
1 parent
addc21bdf6
commit
f8def336d4
3 files changed
+5
-8
No files matched your search
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user