chiark / gitweb /
resolved: Support resolved.conf.d directories in the usual search paths
authorJosh Triplett <josh@joshtriplett.org>
Sat, 29 Nov 2014 09:07:11 +0000 (01:07 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 29 Nov 2014 18:55:32 +0000 (13:55 -0500)
Makefile-man.am
man/resolved.conf.xml
src/resolve/resolved-conf.c
src/resolve/resolved.conf.in

index 01d34087b2aba8f1e5c47ba6e3e07f2806e6e099..36e0ebbb6725cab9d2181be7447927715fe470de 100644 (file)
@@ -1204,8 +1204,13 @@ MANPAGES += \
        man/resolved.conf.5 \
        man/systemd-resolved.service.8
 MANPAGES_ALIAS += \
        man/resolved.conf.5 \
        man/systemd-resolved.service.8
 MANPAGES_ALIAS += \
+       man/resolved.conf.d.5 \
        man/systemd-resolved.8
        man/systemd-resolved.8
+man/resolved.conf.d.5: man/resolved.conf.5
 man/systemd-resolved.8: man/systemd-resolved.service.8
 man/systemd-resolved.8: man/systemd-resolved.service.8
+man/resolved.conf.d.html: man/resolved.conf.html
+       $(html-alias)
+
 man/systemd-resolved.html: man/systemd-resolved.service.html
        $(html-alias)
 
 man/systemd-resolved.html: man/systemd-resolved.service.html
        $(html-alias)
 
index c58236856851ac1e3ec21044738c7f2360b40aa2..36013a5e3a2de333560760f275357c3d39dd38ce 100644 (file)
@@ -22,7 +22,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="resolved.conf" conditional='ENABLE_RESOLVED'>
+<refentry id="resolved.conf" conditional='ENABLE_RESOLVED'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
         <refentryinfo>
                 <title>resolved.conf</title>
                 <productname>systemd</productname>
         <refentryinfo>
                 <title>resolved.conf</title>
                 <productname>systemd</productname>
 
         <refnamediv>
                 <refname>resolved.conf</refname>
 
         <refnamediv>
                 <refname>resolved.conf</refname>
-                <refpurpose>Network Name Resolution configuration file</refpurpose>
+                <refname>resolved.conf.d</refname>
+                <refpurpose>Network Name Resolution configuration files</refpurpose>
         </refnamediv>
 
         <refsynopsisdiv>
                 <para><filename>/etc/systemd/resolved.conf</filename></para>
         </refnamediv>
 
         <refsynopsisdiv>
                 <para><filename>/etc/systemd/resolved.conf</filename></para>
+                <para><filename>/etc/systemd/resolved.conf.d/*.conf</filename></para>
+                <para><filename>/run/systemd/resolved.conf.d/*.conf</filename></para>
+                <para><filename>/usr/lib/systemd/resolved.conf.d/*.conf</filename></para>
         </refsynopsisdiv>
 
         <refsect1>
                 <title>Description</title>
 
         </refsynopsisdiv>
 
         <refsect1>
                 <title>Description</title>
 
-                <para>When starting, systemd-resolved will read the
-                configuration file <filename>resolved.conf</filename>.
-                This configuration file controls local DNS and LLMNR
+                <para>These configuration files control local DNS and LLMNR
                 name resolving.</para>
 
         </refsect1>
 
                 name resolving.</para>
 
         </refsect1>
 
+        <xi:include href="standard-conf.xml" xpointer="confd" />
+        <xi:include href="standard-conf.xml" xpointer="conf" />
+
         <refsect1>
                 <title>Options</title>
 
         <refsect1>
                 <title>Options</title>
 
index 63e87f8df52c44cae9d49c663d2af8cb442a58da..81b9d3438cf6b9bfab6db1d17fd6b09c98afc030 100644 (file)
@@ -147,8 +147,9 @@ int config_parse_support(
 int manager_parse_config_file(Manager *m) {
         assert(m);
 
 int manager_parse_config_file(Manager *m) {
         assert(m);
 
-        return config_parse(NULL, "/etc/systemd/resolved.conf", NULL,
-                            "Resolve\0",
-                            config_item_perf_lookup, resolved_gperf_lookup,
-                            false, false, true, m);
+        return config_parse_many("/etc/systemd/resolved.conf",
+                                 CONF_DIRS_NULSTR("systemd/resolved.conf"),
+                                 "Resolve\0",
+                                 config_item_perf_lookup, resolved_gperf_lookup,
+                                 false, m);
 }
 }
index c8263d67f459c52d9fab2c6fc931719ba799e0f1..e5a19ee474c39ac681899bef4736af0cf35163fd 100644 (file)
@@ -5,6 +5,9 @@
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 #
 #  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 #
+# You can override the directives in this file by creating files in
+# /etc/systemd/resolved.conf.d/*.conf.
+#
 # See resolved.conf(5) for details
 
 [Resolve]
 # See resolved.conf(5) for details
 
 [Resolve]