From c00c826789318cdfed0aeab211be884bef649f17 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 18 Dec 2018 14:49:13 +0000 Subject: ntpdate: use uci configured servers instead of static list If we're going to have a list of ntp servers, we should at least respect them. Fallback to the original static list if no configured servers are found. Signed-off-by: Karl Palsson --- net/ntpd/files/ntpdate.init | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net/ntpd/files') diff --git a/net/ntpd/files/ntpdate.init b/net/ntpd/files/ntpdate.init index 2f332104d..30460e5ae 100644 --- a/net/ntpd/files/ntpdate.init +++ b/net/ntpd/files/ntpdate.init @@ -3,7 +3,9 @@ START=60 -STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org" +DEFAULT_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org" +CFG_SERVERS=$(uci -q get system.ntp.server) +STEP_SERVERS=${CFG_SERVERS:-$DEFAULT_SERVERS} TIMEOUT="2" # in seconds start() { -- cgit v1.2.3