mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-08-25 13:50:12 +03:00
Merge pull request #6231 from keszybz/man-nss-resolved
man: describe the relationship between nss-myhostname and nss-resolved
This commit is contained in:
@ -63,13 +63,24 @@
|
||||
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>. Specifcally, it is recommended to place
|
||||
<literal>resolve</literal> early in <filename>/etc/nsswitch.conf</filename>' <literal>hosts:</literal> line (but
|
||||
<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 the <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>
|
||||
|
@ -1090,6 +1090,18 @@
|
||||
in a namespace container in it.</para>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Install the OpenSUSE Tumbleweed rolling distribution</title>
|
||||
|
||||
<programlisting># zypper --root=/var/lib/machines/tumbleweed ar -c \
|
||||
https://download.opensuse.org/tumbleweed/repo/oss tumbleweed
|
||||
# zypper --root=/var/lib/machines/tumbleweed refresh
|
||||
# zypper --root=/var/lib/machines/tumbleweed install --no-recommends \
|
||||
systemd shadow zypper openSUSE-release vim
|
||||
# systemd-nspawn -M tumbleweed passwd root
|
||||
# systemd-nspawn -M tumbleweed -b</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Boot into an ephemeral snapshot of the host system</title>
|
||||
|
||||
@ -1132,6 +1144,7 @@
|
||||
<citerefentry project='mankier'><refentrytitle>dnf</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||
<citerefentry project='die-net'><refentrytitle>debootstrap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||
<citerefentry project='archlinux'><refentrytitle>pacman</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||
<citerefentry project='mankier'><refentrytitle>zypper</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||
<citerefentry project='man-pages'><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||
|
@ -916,12 +916,14 @@
|
||||
|
||||
<para>Each command line is split on whitespace, with the first item being the command to
|
||||
execute, and the subsequent items being the arguments. Double quotes ("…") and single quotes
|
||||
('…') may be used, in which case everything until the next matching quote becomes part of the
|
||||
same argument. Quotes themselves are removed. C-style escapes are also supported. The table
|
||||
below contains the list of known escape patterns. Only escape patterns which match the syntax in
|
||||
the table are allowed; other patterns may be added in the future and unknown patterns will
|
||||
result in a warning. In particular, any backslashes should be doubled. Finally, a trailing
|
||||
backslash (<literal>\</literal>) may be used to merge lines.</para>
|
||||
('…') may be used to wrap a whole item (the opening quote may appear only at the beginning or
|
||||
after whitespace that is not quoted, and the closing quote must be followed by whitespace or the
|
||||
end of line), in which case everything until the next matching quote becomes part of the same
|
||||
argument. Quotes themselves are removed. C-style escapes are also supported. The table below
|
||||
contains the list of known escape patterns. Only escape patterns which match the syntax in the
|
||||
table are allowed; other patterns may be added in the future and unknown patterns will result in
|
||||
a warning. In particular, any backslashes should be doubled. Finally, a trailing backslash
|
||||
(<literal>\</literal>) may be used to merge lines.</para>
|
||||
|
||||
<para>This syntax is inspired by shell syntax, but only the meta-characters and expansions
|
||||
described in the following paragraphs are understood, and the expansion of variables is
|
||||
|
Reference in New Issue
Block a user