mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07:00
plugins: bootmisc: skip UTMP/WTMP/BTMP on non-utmp systems (musl)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+6
-4
@@ -144,10 +144,12 @@ static void setup(void *arg)
|
||||
/*
|
||||
* UTMP actually needs multiple db files
|
||||
*/
|
||||
create("/var/run/utmp", 0644, 0, gid); /* Currently logged in */
|
||||
create("/var/log/wtmp", 0644, 0, gid); /* Login history */
|
||||
create("/var/log/btmp", 0600, 0, gid); /* Failed logins */
|
||||
create("/var/log/lastlog", 0644, 0, gid);
|
||||
if (has_utmp()) {
|
||||
create("/var/run/utmp", 0644, 0, gid); /* Currently logged in */
|
||||
create("/var/log/wtmp", 0644, 0, gid); /* Login history */
|
||||
create("/var/log/btmp", 0600, 0, gid); /* Failed logins */
|
||||
create("/var/log/lastlog", 0644, 0, gid);
|
||||
}
|
||||
|
||||
/* Set BOOT_TIME UTMP entry */
|
||||
utmp_set_boot();
|
||||
|
||||
Reference in New Issue
Block a user