Browse Source

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 <karlp@etactica.com>
lilik-openwrt-22.03
Karl Palsson 6 years ago
parent
commit
c00c826789
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      net/ntpd/Makefile
  2. +3
    -1
      net/ntpd/files/ntpdate.init

+ 1
- 1
net/ntpd/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
PKG_VERSION:=4.2.8p13
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/


+ 3
- 1
net/ntpd/files/ntpdate.init View File

@ -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() {


Loading…
Cancel
Save