[source] dnsmasq: reload config if host name is modified

LEDE Commits lede-commits at lists.infradead.org
Sun Dec 4 07:38:21 PST 2016


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/854459a2f923376e0e509ebc0fb8ff90e9f13c02

commit 854459a2f923376e0e509ebc0fb8ff90e9f13c02
Author: Florian Eckert <Eckert.Florian at googlemail.com>
AuthorDate: Wed Nov 30 09:08:21 2016 +0100

    dnsmasq: reload config if host name is modified
    
    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 at googlemail.com>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index b1f9e2e..845cf1b 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -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
 }
 



More information about the lede-commits mailing list