[source] odhcpd: Use procd_send_signal in odhcpd-update file

LEDE Commits lede-commits at lists.infradead.org
Wed Dec 21 11:36:03 PST 2016


dedeckeh pushed a commit to source.git, branch master:
https://git.lede-project.org/00dbfa176474a6b441c57023a2d03c0c56a0b063

commit 00dbfa176474a6b441c57023a2d03c0c56a0b063
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Tue Dec 20 22:13:40 2016 +0100

    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 <dedeckeh at gmail.com>
---
 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 5f800aa..9bc7abc 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



More information about the lede-commits mailing list