ntpd: create config_file directory
authorSebastian Kemper <sebastian_ml@gmx.net>
Thu, 28 Nov 2019 19:22:55 +0000 (20:22 +0100)
committertripolar <tripolar@users.noreply.github.com>
Thu, 28 Nov 2019 21:27:03 +0000 (22:27 +0100)
ntpd's configuration is stored in /var/etc, but the init script doesn't
create this directory. To be fair this folder is used by other packages
as well, for instance dnsmasq. Still, it's better not to rely on other
packages to create it.

Fixes: #10636
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/ntpd/Makefile
net/ntpd/files/ntpd.init

index a82e270108712b0dcb96244b9a7ffd2780e5300e..aa16dbf98a07c3924b7da0ac8da28fd7d31abdb8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntp
 PKG_VERSION:=4.2.8p13
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
index 6e73489d4ae8e7842eaf0a2c753b314c1dd1fd7f..0f0f57700703684797aad9523843ed316a4ce4af 100644 (file)
@@ -40,6 +40,8 @@ start_ntpd_instance() {
        # since some of them might be dynamic interfaces (like IPsec
        # tunnels) which aren't known by ubus.
 
+       mkdir -p "$(dirname "$config_file")"
+
        trunc
        emit "driftfile /var/lib/ntp/ntp.drift\n"