systemd/1017-enforce-sufficient-shutdown-warnings.patch

25 lines
1.1 KiB
Diff

Simple fix for bnc#750845. Maybe the original values are broken as the
delay of the first two entries in when_wall() are less then the warning
intervall. Now we warn once per hour in the first 3 hours, then all
30 minutes in last hour, all 15 minutes in the last 45 minutes, all 10
minutes in the last 15 minutes, and then all minute in the last 10 minutes.
---
shutdownd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- systemd-208/src/shutdownd/shutdownd.c
+++ systemd-208/src/shutdownd/shutdownd.c 2014-01-15 12:11:23.206235784 +0000
@@ -156,8 +156,9 @@ _const_ static usec_t when_wall(usec_t n
usec_t delay;
usec_t interval;
} table[] = {
- { 0, USEC_PER_MINUTE },
- { 10 * USEC_PER_MINUTE, 15 * USEC_PER_MINUTE },
+ { 10 * USEC_PER_MINUTE, USEC_PER_MINUTE },
+ { 15 * USEC_PER_MINUTE, 10 * USEC_PER_MINUTE },
+ { 45 * USEC_PER_MINUTE, 15 * USEC_PER_MINUTE },
{ USEC_PER_HOUR, 30 * USEC_PER_MINUTE },
{ 3 * USEC_PER_HOUR, USEC_PER_HOUR },
};