all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergey Trofimov <sarg@sarg.org.ru>
To: 61956@debbugs.gnu.org
Cc: Sergey Trofimov <sarg@sarg.org.ru>
Subject: [bug#61956] [PATCH v2] services: dns: Extend dnsmasq-configuration.
Date: Sat,  4 Mar 2023 09:40:30 +0100	[thread overview]
Message-ID: <20230304084030.32117-1-sarg@sarg.org.ru> (raw)
In-Reply-To: <20230304082719.29479-1-sarg@sarg.org.ru>

---
 doc/guix.texi        | 3 +++
 gnu/services/dns.scm | 9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 74658dbc86..ca66041d12 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -31502,6 +31502,9 @@ 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.
+
 @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
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index 50753b7ab6..3a6a005fb7 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -754,6 +754,8 @@ (define-record-type* <dnsmasq-configuration>
                     (default #f))       ;boolean
   (servers          dnsmasq-configuration-servers
                     (default '()))      ;list of string
+  (servers-file     dnsmasq-configuration-servers-file
+                    (default #f))       ;string
   (addresses        dnsmasq-configuration-addresses
                     (default '()))      ;list of string
   (cache-size       dnsmasq-configuration-cache-size
@@ -792,7 +794,7 @@ (define (dnsmasq-shepherd-service config)
      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?
@@ -827,6 +829,9 @@ (define (dnsmasq-shepherd-service config)
                  #$@(if query-servers-in-order?
                         '("--strict-order")
                         '())
+                 #$@(if servers-file
+                        (list (format #f "--servers-file=~a" servers-file))
+                        '())
                  #$@(map (cut format #f "--server=~a" <>)
                          servers)
                  #$@(map (cut format #f "--address=~a" <>)
@@ -848,7 +853,7 @@ (define (dnsmasq-shepherd-service config)
                         '("--tftp-single-port")
                         '())
                  #$@(if tftp-secure?
-                        '("--tftp-secure?")
+                        '("--tftp-secure")
                         '())
                  #$@(if tftp-max
                         (list (format #f "--tftp-max=~a" tftp-max))
-- 
2.39.1





  reply	other threads:[~2023-03-04  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-04  8:27 [bug#61956] [PATCH] services: dns: Extend dnsmasq-configuration Sergey Trofimov
2023-03-04  8:40 ` Sergey Trofimov [this message]
2023-03-10  7:34   ` [bug#61956] [PATCH v2] " Andrew Tropin
2023-03-10  8:36     ` [bug#61956] [PATCH v3] " Sergey Trofimov
2023-03-10  8:38     ` [bug#61956] [PATCH v2] " Sergey Trofimov
2023-03-10 13:33 ` [bug#61956] [PATCH v4] " Sergey Trofimov
2023-03-10 15:00 ` [bug#61956] [PATCH v5] " Sergey Trofimov
2023-03-13 13:17   ` Andrew Tropin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230304084030.32117-1-sarg@sarg.org.ru \
    --to=sarg@sarg.org.ru \
    --cc=61956@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.