Skip to content

Commit

Permalink
Use current time with soft-reboot and systemd >= v256
Browse files Browse the repository at this point in the history
  • Loading branch information
thkukuk committed May 8, 2024
1 parent 7081b99 commit ef1b8c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wtmpdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,10 @@ main_boot (int argc, char **argv)
int count = soft_reboots_count ();

if (count > 0)
soft_reboot = 1;
{
time = now;
soft_reboot = 1;
}
else if ((count < 0) && ((now - time) > 300 * USEC_PER_SEC) /* 5 minutes */)
{
if (!quiet)
Expand Down

0 comments on commit ef1b8c5

Please sign in to comment.