UTMP: Set BOOT_TIME record and add shutdown

This patch adds support for initializing /var/run/utmp with the initial
reboot as well as a shutdown record in the UTMP db.

Also, the run level change now properly records ~ and ~~ as line and id,
respectively, and the kernel release and time of each UTMP record is now
set properly.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-08-08 19:06:35 +02:00
1 parent 27899feea0
commit addc21bdf6
4 files changed
+43 -5

No files matched your search

+4 -2
View File
@@ -21,9 +21,11 @@
* THE SOFTWARE.
*/
int utmp_set (int type, int pid, char *user);
int utmp_set (int type, int pid, char *user, char *line, char *id);
int utmp_set_boot (void);
int utmp_set_halt (void);
int utmp_set_runlevel(int pre, int now);
int utmp_show(char *file);
int utmp_show (char *file);
/**
* Local Variables: