summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-07 17:40:10 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-07 17:40:10 +0100
commitdbda6dce3d250cee3a9d2bd1591ec1746a43585f (patch)
tree84896ae30a53053a83177cc23b2936409e6bbce5
parent49aa61a550b3baadb1fb50e586d8fbe8b642025f (diff)
man: document nss-mymachines
-rw-r--r--Makefile-man.am7
-rw-r--r--man/nss-myhostname.xml14
-rw-r--r--man/nss-mymachines.xml116
-rw-r--r--man/systemd-machined.service.xml13
4 files changed, 141 insertions, 9 deletions
diff --git a/Makefile-man.am b/Makefile-man.am
index f212a0f939..b2869c4ee1 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -1171,10 +1171,16 @@ endif
if ENABLE_MACHINED
MANPAGES += \
man/machinectl.1 \
+ man/nss-mymachines.8 \
man/systemd-machined.service.8
MANPAGES_ALIAS += \
+ man/libnss_mymachines.so.2.8 \
man/systemd-machined.8
+man/libnss_mymachines.so.2.8: man/nss-mymachines.8
man/systemd-machined.8: man/systemd-machined.service.8
+man/libnss_mymachines.so.2.html: man/nss-mymachines.html
+ $(html-alias)
+
man/systemd-machined.html: man/systemd-machined.service.html
$(html-alias)
@@ -1637,6 +1643,7 @@ EXTRA_DIST += \
man/machinectl.xml \
man/modules-load.d.xml \
man/nss-myhostname.xml \
+ man/nss-mymachines.xml \
man/os-release.xml \
man/pam_systemd.xml \
man/resolved.conf.xml \
diff --git a/man/nss-myhostname.xml b/man/nss-myhostname.xml
index 0f68c4d36e..c7a2cd9ae7 100644
--- a/man/nss-myhostname.xml
+++ b/man/nss-myhostname.xml
@@ -67,11 +67,12 @@
<itemizedlist>
<listitem><para>The local, configured hostname
- is resolved to all locally configured public
- IP addresses, or -- if none are configured --
- the IPv4 address 127.0.0.2 (which is on the
- local loopback) and the IPv6 address ::1
- (which is the local host).</para></listitem>
+ is resolved to all locally configured IP
+ addresses ordered by their scope, or -- if
+ none are configured -- the IPv4 address
+ 127.0.0.2 (which is on the local loopback) and
+ the IPv6 address ::1 (which is the local
+ host).</para></listitem>
<listitem><para>The hostname
<literal>localhost</literal> is resolved to
@@ -125,7 +126,7 @@
group: compat
shadow: compat
-hosts: files dns <command>myhostname</command>
+hosts: files dns mymachines <command>myhostname</command>
networks: files
protocols: db files
@@ -153,6 +154,7 @@ netgroup: nis</programlisting>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
diff --git a/man/nss-mymachines.xml b/man/nss-mymachines.xml
new file mode 100644
index 0000000000..94673918cb
--- /dev/null
+++ b/man/nss-mymachines.xml
@@ -0,0 +1,116 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+ This file is part of systemd.
+
+ Copyright 2014 Lennart Poettering
+
+ 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/>.
+-->
+
+<refentry id="nss-mymachines" conditional='ENABLE_MACHINED'>
+
+ <refentryinfo>
+ <title>nss-mymachines</title>
+ <productname>systemd</productname>
+
+ <authorgroup>
+ <author>
+ <contrib>Developer</contrib>
+ <firstname>Lennart</firstname>
+ <surname>Poettering</surname>
+ <email>lennart@poettering.net</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>nss-mymachines</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>nss-mymachines</refname>
+ <refname>libnss_mymachines.so.2</refname>
+ <refpurpose>Provide hostname resolution for local
+ container instances.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <para><filename>libnss_mymachines.so.2</filename></para>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><command>nss-mymachines</command> is a plugin
+ for the GNU Name Service Switch (NSS) functionality of
+ the GNU C Library (<command>glibc</command>) providing
+ hostname resolution for containers running locally,
+ that are registered with
+ <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
+ container names are resolved to IP addresses of the
+ specific container, ordered by their scope.</para>
+
+ <para>To activate the NSS modules,
+ <literal>mymachines</literal> has to be added to the
+ line starting with <literal>hosts:</literal> in
+ <filename>/etc/nsswitch.conf</filename>.</para>
+
+ <para>It is recommended to place
+ <literal>mymachines</literal> near the end of the
+ <filename>nsswitch.conf</filename> line to make sure
+ that this mapping is only used as fallback, and any
+ DNS or <filename>/etc/hosts</filename> based mapping
+ takes precedence.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Example</title>
+
+ <para>Here's an example
+ <filename>/etc/nsswitch.conf</filename> file, that
+ enables <command>mymachines</command>
+ correctly:</para>
+
+<programlisting>passwd: compat
+group: compat
+shadow: compat
+
+hosts: files dns <command>mymachines</command> myhostname
+networks: files
+
+protocols: db files
+services: db files
+ethers: db files
+rpc: db files
+
+netgroup: nis</programlisting>
+
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+ <para>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+
+</refentry>
diff --git a/man/systemd-machined.service.xml b/man/systemd-machined.service.xml
index 352b4a025f..475b53a86e 100644
--- a/man/systemd-machined.service.xml
+++ b/man/systemd-machined.service.xml
@@ -63,8 +63,13 @@
<para>See
<citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
- for some examples on how to start a container the systemd
- way.</para>
+ for some examples on how to run containers with OS tools.</para>
+
+ <para>Use
+ <citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ to make the names of local containers known to
+ <command>systemd-machined</command> locally resolvable
+ as host names.</para>
<para>See the <ulink
url="http://www.freedesktop.org/wiki/Software/systemd/machined">
@@ -78,7 +83,9 @@
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>