From ef1b8c57948a3acaf07aa20c8579bca6b2c14f9c Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 8 May 2024 10:36:01 +0200 Subject: [PATCH] Use current time with soft-reboot and systemd >= v256 --- src/wtmpdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wtmpdb.c b/src/wtmpdb.c index 16d9dbf..b5caf57 100644 --- a/src/wtmpdb.c +++ b/src/wtmpdb.c @@ -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)