diff options
author | Pierre Langlois <pierre.langlois@gmx.com> | 2020-04-10 17:00:47 +0100 |
---|---|---|
committer | 宋文武 <iyzsong@member.fsf.org> | 2020-05-02 13:00:24 +0800 |
commit | 5a0b78e62bc3122998990cea5ee17bdb2789aada (patch) | |
tree | 8f22dba0ee7cd0c8071efa1505bfccf642003dab /gnu/services | |
parent | f2531a254f7133b343034aa2c66fe14e518c45b8 (diff) | |
download | patches-5a0b78e62bc3122998990cea5ee17bdb2789aada.tar patches-5a0b78e62bc3122998990cea5ee17bdb2789aada.tar.gz |
services: dnsmasq: Support the --address flag.
Introduce a new `addresses' field that translates to passing `--address='
multiple times to dnsmasq.
* gnu/services/dns.scm (<dnsmasq-configuration>): Add an addresses field.
(dnsmasq-shepherd-service): Match the addresses field and translate it to
multiple '--address=' flags.
* doc/guix.texi (DNS Services): Document it.
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/dns.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index a07946d085..478c837d13 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> +;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -748,6 +749,8 @@ cache.size = 100 * MB (default #f)) ;boolean (servers dnsmasq-configuration-servers (default '())) ;list of string + (addresses dnsmasq-configuration-addresses + (default '())) ;list of string (cache-size dnsmasq-configuration-cache-size (default 150)) ;integer (negative-cache? dnsmasq-configuration-negative-cache? @@ -759,7 +762,7 @@ cache.size = 100 * MB no-hosts? port local-service? listen-addresses resolv-file no-resolv? servers - cache-size negative-cache?) + addresses cache-size negative-cache?) (shepherd-service (provision '(dnsmasq)) (requirement '(networking)) @@ -783,6 +786,8 @@ cache.size = 100 * MB '()) #$@(map (cut format #f "--server=~a" <>) servers) + #$@(map (cut format #f "--address=~a" <>) + addresses) #$(format #f "--cache-size=~a" cache-size) #$@(if negative-cache? '() |