mirror of https://github.com/hak5/openwrt-owl.git
odhcpd: Fix dnsmasq re-reading hostfile
Depending on the dhcp uci config pidof dnsmasq can return multiple pids. Fix re-reading of the hostfile by dnsmasq in such case by sending SIGHUP signal to each of the returned pids. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>owl
parent
942904f7b9
commit
a7c2310278
|
@ -8,7 +8,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=odhcpd
|
||||
PKG_VERSION:=2016-11-21
|
||||
PKG_VERSION:=2016-12-13
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
|
|
|
@ -2,4 +2,7 @@
|
|||
# Make dnsmasq reread hostfile
|
||||
|
||||
pid=$(pidof dnsmasq)
|
||||
[ "$(readlink /proc/$pid/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $pid
|
||||
|
||||
for i in $pid; do
|
||||
[ "$(readlink /proc/$i/exe)" = "/usr/sbin/dnsmasq" ] && kill -SIGHUP $i
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue