summary refs log tree commit diff
path: root/gnu/services/dns.scm
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2018-06-08 23:12:37 +0800
committer宋文武 <iyzsong@member.fsf.org>2018-06-08 23:32:49 +0800
commitc061eb587cbb8590a5cd4793b56a01560af747a8 (patch)
tree40e7c41d36faf7a5a9de0cb508c661c24785a43f /gnu/services/dns.scm
parent129948dcbda91d4449b56e3816eede249e34afb6 (diff)
downloadguix-c061eb587cbb8590a5cd4793b56a01560af747a8.tar.gz
services: dnsmasq: Use 'negative-cache?' instead of 'no-negcache?'.
The 'no-negcache?' option is mapped to the '--no-negcache' command-line
argument directly, but we're in the scheme world, where the general guideline
is to avoid double-negations in identifiers.

* gnu/services/dns.scm <dnsmasq-configuration>: Replace the 'no-negcache?'
field with 'negative-cache?'.
* doc/guix.texi (DNS Services)[Dnsmasq Service]: Adjust accordingly.
Diffstat (limited to 'gnu/services/dns.scm')
-rw-r--r--gnu/services/dns.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index d0913e90ed..1b39d0f508 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -622,8 +622,8 @@
                     (default '()))      ;list of string
   (cache-size       dnsmasq-configuration-cache-size
                     (default 150))      ;integer
-  (no-negcache?     dnsmasq-configuration-no-negcache?
-                    (default #f)))      ;boolean
+  (negative-cache?  dnsmasq-configuration-negative-cache?
+                    (default #t)))      ;boolean
 
 (define dnsmasq-shepherd-service
   (match-lambda
@@ -631,7 +631,7 @@
                                 no-hosts?
                                 port local-service? listen-addresses
                                 resolv-file no-resolv? servers
-                                cache-size no-negcache?)
+                                cache-size negative-cache?)
      (shepherd-service
       (provision '(dnsmasq))
       (requirement '(networking))
@@ -656,9 +656,9 @@
                   #$@(map (cut format #f "--server=~a" <>)
                           servers)
                   #$(format #f "--cache-size=~a" cache-size)
-                  #$@(if no-negcache?
-                         '("--no-negcache")
-                         '()))
+                  #$@(if negative-cache?
+                         '()
+                         '("--no-negcache")))
                 #:pid-file "/run/dnsmasq.pid"))
       (stop #~(make-kill-destructor))))))