]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/functions/functions.dns
Merge branch 'master' of git://git.ipfire.org/network
[people/stevee/network.git] / src / functions / functions.dns
index de08c4c7aa592b553036ba5065ff4bb82c54524f..a54feecd12d93ccd40f0508cb4f29796a7d037c2 100644 (file)
@@ -225,6 +225,16 @@ dns_server_parse_line() {
        return ${EXIT_OK}
 }
 
+# This function should be called after any configuration
+# changes have been made to the DNS servers.
+dns_server_update() {
+       # Regenerate /etc/resolv.conf
+       dns_generate_resolvconf
+
+       # Restart radvd which propagates IPv6 DNS servers
+       radvd_update
+}
+
 # Update resolv.conf(5) when initializing the network.
 init_register dns_generate_resolvconf
 
@@ -276,6 +286,9 @@ dns_get_search_domains() {
                done
        done
 
+       # Add our own domain
+       list_append search_domains "$(config_domainname)"
+
        # Sort out duplicate entries.
        list_unique ${search_domains}
 }