diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-11-17 13:34:34 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2016-12-13 23:32:57 +0100 |
commit | a7c2310278c3554e78f26f6f84803669d9573dc6 (patch) | |
tree | 0e82ae39a16f65f28e01170f17d7d928e83d2f2b /package/network/services/odhcpd/files | |
parent | 942904f7b9363f231a9623d7d5501ae0cc7184d2 (diff) | |
download | upstream-a7c2310278c3554e78f26f6f84803669d9573dc6.tar.gz upstream-a7c2310278c3554e78f26f6f84803669d9573dc6.tar.bz2 upstream-a7c2310278c3554e78f26f6f84803669d9573dc6.zip |
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>
Diffstat (limited to 'package/network/services/odhcpd/files')
-rwxr-xr-x | package/network/services/odhcpd/files/odhcpd-update | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/network/services/odhcpd/files/odhcpd-update b/package/network/services/odhcpd/files/odhcpd-update index e17cd0bfff..5f800aac60 100755 --- a/package/network/services/odhcpd/files/odhcpd-update +++ b/package/network/services/odhcpd/files/odhcpd-update @@ -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 |