summaryrefslogtreecommitdiff
path: root/package/network/services/dnsmasq/files/dnsmasqsec-add-conffiles.sh
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>2016-06-14 11:00:21 +0100
committerJo-Philipp Wich <jo@mein.io>2016-06-24 13:53:39 +0200
commit5acfe55d7139a5294192bddf10fe3a1de3180e8d (patch)
treeaf9ae27bea9fb950c10cd60f21013f9f4815ce38 /package/network/services/dnsmasq/files/dnsmasqsec-add-conffiles.sh
parentf954f4337b85bd8d8ad6a589bc63edf48f777ee6 (diff)
downloadmtk-20170518-5acfe55d7139a5294192bddf10fe3a1de3180e8d.zip
mtk-20170518-5acfe55d7139a5294192bddf10fe3a1de3180e8d.tar.gz
mtk-20170518-5acfe55d7139a5294192bddf10fe3a1de3180e8d.tar.bz2
dnsmasq: dnssec time handling uses ntpd hotplug
Change dnsmasq's dnssec time check handling to use time validity indicated by ntpd rather than maintaining a cross boot/upgrade /etc/dnsmasq.time timestamp file. This saves flash device wear. If ntpd client is configured in uci and you're using dnssec, then dnsmasq will not check dnssec timestamp validity until ntpd hotplug indicates sync via a stratum change. The ntpd hotplug leaves a status flag file to indicate to dnsmasq.init that time is valid and that it should now start in 'check dnssec timestamp valid' mode. If ntpd client is not configured and you're using dnssec, then it is presumed you're using an alternate time sync mechanism and that time is correct, thus dnsmasq checks dnssec timestamps are valid from 1st start. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> V2 - stratum & step ntp changes indicate time is valid V3 - on initial flag file step signal dnsmasq with SIGHUP if running V4 - only accept step ntp changes. Accepting both stratum & step could result in unpleasant script race conditions V5 - Actually only accepting stratum is the correct thing to do after further testing V6 - improve handling of non busybox ntpd if sysntpd not executable dnsmasq checks dnssec timestamps else sysntp script disabled - look for timestamp file - allows external mechanism to use hotplug flag file sysntp script enabled & uci ntp enabled - look for timestamp file sysntp script enabled & uci ntp disabled - dnsmasq checks dnssec timestamps fi
Diffstat (limited to 'package/network/services/dnsmasq/files/dnsmasqsec-add-conffiles.sh')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasqsec-add-conffiles.sh16
1 files changed, 0 insertions, 16 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasqsec-add-conffiles.sh b/package/network/services/dnsmasq/files/dnsmasqsec-add-conffiles.sh
deleted file mode 100644
index 116ab5f..0000000
--- a/package/network/services/dnsmasq/files/dnsmasqsec-add-conffiles.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-add_dnsmasqsec_conffiles()
-{
- local filelist="$1"
-
- # do NOT include timestamp in a backup, only system upgrade
- # dnsmasq restart ensures file timestamp is up to date
- if [ -z $NEED_IMAGE ]; then
- if [ $(ubus call service list '{"name":"dnsmasq"}' | jsonfilter -e '@.*.instances.instance1.running') = "true" ]; then
- /etc/init.d/dnsmasq restart
- sleep 1
- echo "/etc/dnsmasq.time" >>$filelist
- fi
- fi
-}
-
-sysupgrade_init_conffiles="$sysupgrade_init_conffiles add_dnsmasqsec_conffiles"