Skip to content

Commit

Permalink
Merge pull request openwrt#12811 from TDT-AG/pr/20200714-ntpd
Browse files Browse the repository at this point in the history
ntpd: add config include support
  • Loading branch information
neheb authored Aug 5, 2020
2 parents 1be8f07 + 86a2e8f commit 8b004db
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/ntpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
14 changes: 14 additions & 0 deletions net/ntpd/files/ntpd.init
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8b004db

Please sign in to comment.