aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Luehrsen <ericluehrsen@hotmail.com>2016-12-23 02:37:21 -0500
committerEric Luehrsen <ericluehrsen@hotmail.com>2017-01-22 20:53:04 -0500
commitee8b15cad2f43e626df62e9d567b0ef09fa682cb (patch)
tree6feb19a9ff22ef2a014545b942b907f6b4af32a5
parent7c374fa372cb9d188d33eeddc241e767ab64394e (diff)
unbound: improve NTP hotplug behavior when Unbound is disabled
If Unbound was disabled and at later time enabled, then it would operate in DNSSEC less-secure mode. When NTP hotplug was called, the timestamp file was not updated. This was found testing Unbound vs other tools (bind, dnsmasq). Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
-rwxr-xr-xnet/unbound/files/unbound.ntpd6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/unbound/files/unbound.ntpd b/net/unbound/files/unbound.ntpd
index 2f312d90c..5c7191656 100755
--- a/net/unbound/files/unbound.ntpd
+++ b/net/unbound/files/unbound.ntpd
@@ -17,11 +17,9 @@
##############################################################################
-if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] \
- && /etc/init.d/unbound enabled ; then
- #
+if [ "$ACTION" = stratum -a ! -f "$UNBOUND_TIMEFILE" ] ; then
echo "ntpd: $( date )" > $UNBOUND_TIMEFILE
- /etc/init.d/unbound restart
+ /etc/init.d/unbound enabled && /etc/init.d/unbound restart
fi
##############################################################################