Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsmasq: reload config if host name is modified #575

Closed
wants to merge 1 commit into from

Conversation

feckert
Copy link
Contributor

@feckert feckert commented Nov 30, 2016

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

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>
@@ -825,6 +825,7 @@ start_service() {

reload_service() {
rc_procd start_service "$@"
killall -HUP dnsmasq
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really required ? would the line above not restart the service ?

@feckert
Copy link
Contributor Author

feckert commented Dec 2, 2016

@blogic
I have tested it on my router. And the PID of dnsmasq Process is the same as before. This Signal only reloads some files see http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

NOTES
When it receives a SIGHUP, dnsmasq clears its cache and then re-loads /etc/hosts and /etc/ethers and any file given by --dhcp-hostsfile, --dhcp-hostsdir, --dhcp-optsfile, --dhcp-optsdir, --addn-hosts or --hostsdir. The dhcp lease change script is called for all existing DHCP leases. If --no-poll is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP does NOT re-read the configuration file.

@blogic
Copy link
Contributor

blogic commented Dec 4, 2016

merged, Thanks !

@blogic blogic closed this Dec 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants