From: Hans Dedecker Date: Tue, 20 Dec 2016 21:13:40 +0000 (+0100) Subject: odhcpd: Use procd_send_signal in odhcpd-update file X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fblogic.git;a=commitdiff_plain;h=00dbfa176474a6b441c57023a2d03c0c56a0b063 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 --- diff --git a/package/network/services/odhcpd/files/odhcpd-update b/package/network/services/odhcpd/files/odhcpd-update index 5f800aac60a8..9bc7abcc1c3a 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