From: Denys Vlasenko Date: Tue, 26 Dec 2017 19:19:37 +0000 (+0100) Subject: ntpd: do run the script at leat once in 11 minutes X-Git-Tag: 1_28_0~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=36acc4631c94bb0f43ecaac5d61dc773ef773e91;p=oweals%2Fbusybox.git ntpd: do run the script at leat once in 11 minutes function old new delta ntpd_main 1197 1226 +29 Signed-off-by: Denys Vlasenko --- diff --git a/networking/ntpd.c b/networking/ntpd.c index 0b60d003b..17e5c7da6 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -2362,7 +2362,9 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv) /* Nothing between here and poll() blocks for any significant time */ - nextaction = G.cur_time + 3600; + nextaction = G.last_script_run + (11*60); + if (nextaction < G.cur_time + 1) + nextaction = G.cur_time + 1; i = 0; #if ENABLE_FEATURE_NTPD_SERVER