Browse Source

ntpd: add config include support

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 4 years ago
parent
commit
86a2e8f671
2 changed files with 15 additions and 1 deletions
  1. +1
    -1
      net/ntpd/Makefile
  2. +14
    -0
      net/ntpd/files/ntpd.init

+ 1
- 1
net/ntpd/Makefile View File

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


+ 14
- 0
net/ntpd/files/ntpd.init View File

@ -75,6 +75,20 @@ start_ntpd_instance() {
emit "server $i iburst" emit "server $i iburst"
done done
if [ -d "/etc/ntpd.d" ]; then
local entry
for entry in "/etc/ntpd.d"/*.conf; do
emit "includefile ${entry}\n"
done
fi
if [ -d "/tmp/ntpd.d" ]; then
local entry
for entry in "/tmp/ntpd.d"/*.conf; do
emit "includefile ${entry}\n"
done
fi
mkdir -p /var/lib/ntp mkdir -p /var/lib/ntp
chown -R ntp:ntp /var/lib/ntp chown -R ntp:ntp /var/lib/ntp


Loading…
Cancel
Save