Merge pull request #12811 from TDT-AG/pr/20200714-ntpd

ntpd: add config include support
This commit is contained in:
Rosen Penev 2020-08-05 13:29:20 -07:00 committed by GitHub
commit 8b004dbfba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
PKG_VERSION:=4.2.8p15
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/

View file

@ -75,6 +75,20 @@ start_ntpd_instance() {
emit "server $i iburst"
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
chown -R ntp:ntp /var/lib/ntp