[source] dnsmasq: use ubus signalling in ntp hotplug script
LEDE Commits
lede-commits at lists.infradead.org
Fri Jan 13 07:08:32 PST 2017
dedeckeh pushed a commit to source.git, branch master:
https://git.lede-project.org/c914fa04a3cb20f3c4134c3a2c4a4caf7160edd2
commit c914fa04a3cb20f3c4134c3a2c4a4caf7160edd2
Author: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
AuthorDate: Thu Jan 12 19:28:53 2017 +0000
dnsmasq: use ubus signalling in ntp hotplug script
Use ubus process signalling instead of 'kill pidof dnsmasq' for
SIGHUP signalling to dnsmasq when ntp says time is valid.
Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
---
package/network/services/dnsmasq/files/dnsmasqsec.hotplug | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
index 5c69314..a155eb0 100644
--- a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
+++ b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
@@ -1,5 +1,7 @@
#!/bin/sh
+. /lib/functions/procd.sh
+
TIMEVALIDFILE="/var/state/dnsmasqsec"
[ "$ACTION" = stratum ] || exit 0
@@ -7,8 +9,6 @@ TIMEVALIDFILE="/var/state/dnsmasqsec"
[ -f "$TIMEVALIDFILE" ] || {
echo "ntpd says time is valid" >$TIMEVALIDFILE
/etc/init.d/dnsmasq enabled && {
- pid=$(pidof dnsmasq)
- [ "$(readlink /proc/$pid/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $pid \
- || /etc/init.d/dnsmasq restart
+ procd_send_signal dnsmasq
}
}
More information about the lede-commits
mailing list