services: dns: Extend dnsmasq-configuration.
* gnu/service/dns.scm: (<dnsmasq-configuration>)[servers-file]: Add. (<dnsmasq-configuration>)[tftp-secure?]: Fix typo in parameter name. * doc/guix.texi: Document (<dnsmasq-configuration>)[servers-file]. Signed-off-by: Andrew Tropin <andrew@trop.in>master
parent
377c8143e7
commit
d1edb26388
|
@ -31528,6 +31528,10 @@ in @var{servers}.
|
|||
@item @code{servers} (default: @code{'()})
|
||||
Specify IP address of upstream servers directly.
|
||||
|
||||
@item @code{servers-file} (default: @code{#f})
|
||||
Specify file containing upstream servers. This file is re-read when dnsmasq receives SIGHUP.
|
||||
Could be either a string or a file-like object.
|
||||
|
||||
@item @code{addresses} (default: @code{'()})
|
||||
For each entry, specify an IP address to return for any host in the
|
||||
given domains. Queries in the domains are never forwarded and always
|
||||
|
|
|
@ -754,6 +754,8 @@ cache.size = 100 * MB
|
|||
(default #f)) ;boolean
|
||||
(servers dnsmasq-configuration-servers
|
||||
(default '())) ;list of string
|
||||
(servers-file dnsmasq-configuration-servers-file
|
||||
(default #f)) ;string|file-like
|
||||
(addresses dnsmasq-configuration-addresses
|
||||
(default '())) ;list of string
|
||||
(cache-size dnsmasq-configuration-cache-size
|
||||
|
@ -792,7 +794,7 @@ cache.size = 100 * MB
|
|||
port local-service? listen-addresses
|
||||
resolv-file no-resolv?
|
||||
forward-private-reverse-lookup? query-servers-in-order?
|
||||
servers addresses
|
||||
servers addresses servers-file
|
||||
cache-size negative-cache?
|
||||
cpe-id
|
||||
tftp-enable? tftp-no-fail?
|
||||
|
@ -805,7 +807,8 @@ cache.size = 100 * MB
|
|||
(requirement '(networking))
|
||||
(documentation "Run the dnsmasq DNS server.")
|
||||
(start #~(make-forkexec-constructor
|
||||
'(#$(file-append package "/sbin/dnsmasq")
|
||||
(list
|
||||
#$(file-append package "/sbin/dnsmasq")
|
||||
"--keep-in-foreground"
|
||||
"--pid-file=/run/dnsmasq.pid"
|
||||
#$@(if no-hosts?
|
||||
|
@ -827,6 +830,9 @@ cache.size = 100 * MB
|
|||
#$@(if query-servers-in-order?
|
||||
'("--strict-order")
|
||||
'())
|
||||
#$@(if servers-file
|
||||
(list #~(string-append "--servers-file=" #$servers-file))
|
||||
'())
|
||||
#$@(map (cut format #f "--server=~a" <>)
|
||||
servers)
|
||||
#$@(map (cut format #f "--address=~a" <>)
|
||||
|
@ -848,7 +854,7 @@ cache.size = 100 * MB
|
|||
'("--tftp-single-port")
|
||||
'())
|
||||
#$@(if tftp-secure?
|
||||
'("--tftp-secure?")
|
||||
'("--tftp-secure")
|
||||
'())
|
||||
#$@(if tftp-max
|
||||
(list (format #f "--tftp-max=~a" tftp-max))
|
||||
|
|
Reference in New Issue