From 00dbfa176474a6b441c57023a2d03c0c56a0b063 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 20 Dec 2016 22:13:40 +0100 Subject: [PATCH] odhcpd: Use procd_send_signal in odhcpd-update file Let dnsmasq reread the leasefile by using procd_send_signal which triggers procd to send SIGHUP kill signal by default if signal is not specified Signed-off-by: Hans Dedecker --- package/network/services/odhcpd/files/odhcpd-update | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/package/network/services/odhcpd/files/odhcpd-update b/package/network/services/odhcpd/files/odhcpd-update index 5f800aac60..9bc7abcc1c 100755 --- a/package/network/services/odhcpd/files/odhcpd-update +++ b/package/network/services/odhcpd/files/odhcpd-update @@ -1,8 +1,6 @@ #!/bin/sh -# Make dnsmasq reread hostfile +# Make dnsmasq reread hostfile by sending SIGHUP signal -pid=$(pidof dnsmasq) +. $IPKG_INSTROOT/lib/functions/procd.sh -for i in $pid; do - [ "$(readlink /proc/$i/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $i -done +procd_send_signal dnsmasq