]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/nss-resolve.xml
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / man / nss-resolve.xml
index 9f24f6501958d012827d7d8e6c515d19f79e7f0c..95542993da96452e9ad9924aaaed55ee3ff4cafa 100644 (file)
@@ -3,26 +3,12 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
+  SPDX-License-Identifier: LGPL-2.1+
 
-  Copyright 2011 Lennart Poettering
-  Copyright 2013 Tom Gundersen
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  Copyright © 2013 Tom Gundersen
 -->
 
-<refentry id="nss-resolve" conditional='ENABLE_RESOLVED'>
+<refentry id="nss-resolve" conditional='ENABLE_RESOLVE'>
 
   <refentryinfo>
     <title>nss-resolve</title>
     hostnames via DNS.</para>
 
     <para>To activate the NSS module, add <literal>resolve</literal> to the line starting with
-    <literal>hosts:</literal> in <filename>/etc/nsswitch.conf</filename>.</para>
-
-    <para>It is recommended to place <literal>resolve</literal> early in <filename>/etc/nsswitch.conf</filename>'
-    <literal>hosts:</literal> line (but after the <literal>files</literal> or <literal>mymachines</literal> entries),
-    replacing the <literal>dns</literal> entry if it exists, to ensure DNS queries are always routed via
-    <citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
-
-    <para>Note that <command>nss-resolve</command> will chain-load <command>nss-dns</command> if
-    <filename>systemd-resolved.service</filename> is not running, ensuring that basic DNS resolution continues to work
-    if the service is down.</para>
+    <literal>hosts:</literal> in <filename>/etc/nsswitch.conf</filename>. Specifically, it is recommended to place
+    <literal>resolve</literal> early in <filename>/etc/nsswitch.conf</filename>'s <literal>hosts:</literal> line (but
+    after the <literal>files</literal> or <literal>mymachines</literal> entries), right before the
+    <literal>dns</literal> entry if it exists, followed by <literal>[!UNAVAIL=return]</literal>, to ensure DNS queries
+    are always routed via
+    <citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry> if it is
+    running, but are routed to <command>nss-dns</command> if this service is not available.</para>
+
+    <para>Note that <command>systemd-resolved</command> will synthesize DNS resource
+    records in a few cases, for example for <literal>localhost</literal> and the
+    current hostname, see
+    <citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    for the full list. This duplicates the functionality of
+    <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+    but it is still recommended (see examples below) to keep
+    <command>nss-myhostname</command> configured in
+    <filename>/etc/nsswitch.conf</filename>, to keep those names resolveable if
+    <command>systemd-resolved</command> is not running.</para>
   </refsect1>
 
   <refsect1>
@@ -94,9 +88,6 @@ ethers:         db files
 rpc:            db files
 
 netgroup:       nis</programlisting>
-
-    <para>This keeps the <command>dns</command> module as a fallback for cases where the <command>nss-resolve</command>
-    module is not installed.</para>
   </refsect1>
 
   <refsect1>