odhcpd: Fix dnsmasq re-reading hostfile
[openwrt/openwrt.git] / package / network / services / odhcpd / files / odhcpd-update
index e17cd0bfff6bfbc3fcf474e8ea2275c043dcdc75..5f800aac60a882bc9284491cda21c465b7a71abf 100755 (executable)
@@ -2,4 +2,7 @@
 # Make dnsmasq reread hostfile
 
 pid=$(pidof dnsmasq)
 # 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