1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

services: dnsmasq: Add pid-file, conf-file and conf-dir configuration fields.

* gnu/services/dns.scm (<dnsmasq-configuration>) [pid-file]: New field
to specify alternate path for dnsmasq PID.
[conf-file]: New field to specify one or more configuration files.
[conf-dir]: New field to read configuration files from a directory.
[extra-options]: Move to the end of the definition as a last resort option.
(dnsmasq-shepherd-service): Use new fields instead of hardcoded values.
* gnu/services/dns.scm: Export all record accessors.
* doc/guix.texi: Document new configuration options.

Change-Id: Iaec361e7d8bfd60af04f023f57d422b55b0c1eea
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Alexey Abramov
2025-05-08 19:47:42 +02:00
committed by Maxim Cournoyer
parent 6d5f630fa5
commit 50126b39ac
2 changed files with 65 additions and 6 deletions

View File

@@ -36129,6 +36129,9 @@ value if you intend to run several @command{dnsmasq} instances.
Likewise, @code{shepherd-requirement} is a list of Shepherd service names
(symbols) that this service will depend on.
@item @code{pid-file} (default: @code{"/run/dnsmasq.pid"})
Specify an alternate path for dnsmasq to record its process-id in.
@item @code{no-hosts?} (default: @code{#f})
When true, don't read the hostnames in /etc/hosts.
@@ -36249,6 +36252,16 @@ separated by dashes, e.g.: @samp{01-02-03-04-aa-bb}. Note that
resolving MAC addresses is only possible if the client is in the local
network or obtained a DHCP lease from dnsmasq.
@item @code{conf-file} (default: @code{'()})
File names of configuration files to use. Strings and file-like objects
are accepted.
@item @code{conf-dir} (default: @code{#f})
Read all the files in the given directory as configuration files.
Support for @command{dnsmasq} field extensions is not implemented; users
can use @code{computed-file} to build a directory of files instead. The
configuration files are loaded in alphabetical order of file name.
@item @code{extra-options} (default: @code{'()})
This option provides an ``escape hatch'' for the user to provide arbitrary
command-line arguments to @command{dnsmasq} as a list of strings.