odhcpd: Fix dnsmasq re-reading hostfile
[openwrt/openwrt.git] / package / network / services / odhcpd / files / odhcpd-update
index e17cd0b..5f800aa 100755 (executable)
@@ -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