dnsmasq: reload config if host name is modified
authorFlorian Eckert <Eckert.Florian@googlemail.com>
Wed, 30 Nov 2016 08:08:21 +0000 (09:08 +0100)
committerJohn Crispin <john@phrozen.org>
Sun, 4 Dec 2016 14:56:04 +0000 (15:56 +0100)
If the hostname in /etc/config/system is modified the dnsmasq will not
reread the update host file under /tmp/hosts/dhcp.$cfg.

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
package/network/services/dnsmasq/files/dnsmasq.init

index b1f9e2e29010c4a5e06f6dc2bc8ccaa3fd022deb..845cf1b5e338e059b8944677a4441ac24fd149a1 100644 (file)
@@ -785,7 +785,7 @@ dnsmasq_stop()
 
 service_triggers()
 {
-       procd_add_reload_trigger "dhcp"
+       procd_add_reload_trigger "dhcp" "system"
        procd_add_raw_trigger "interface.*" 2000 /etc/init.d/dnsmasq reload
 }
 
@@ -825,6 +825,7 @@ start_service() {
 
 reload_service() {
        rc_procd start_service "$@"
+       killall -HUP dnsmasq
        return 0
 }