From: Lennart Poettering Date: Wed, 7 Jan 2015 16:40:10 +0000 (+0100) Subject: man: document nss-mymachines X-Git-Tag: v219~655 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=dbda6dce3d250cee3a9d2bd1591ec1746a43585f man: document nss-mymachines --- diff --git a/Makefile-man.am b/Makefile-man.am index f212a0f93..b2869c4ee 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 0f68c4d36..c7a2cd9ae 100644 --- a/man/nss-myhostname.xml +++ b/man/nss-myhostname.xml @@ -67,11 +67,12 @@ 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). + 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). The hostname localhost is resolved to @@ -125,7 +126,7 @@ group: compat shadow: compat -hosts: files dns myhostname +hosts: files dns mymachines myhostname networks: files protocols: db files @@ -153,6 +154,7 @@ netgroup: nis See Also systemd1, + nss-mymachines8, nsswitch.conf5, getent1 diff --git a/man/nss-mymachines.xml b/man/nss-mymachines.xml new file mode 100644 index 000000000..94673918c --- /dev/null +++ b/man/nss-mymachines.xml @@ -0,0 +1,116 @@ + + + + + + + + + nss-mymachines + systemd + + + + Developer + Lennart + Poettering + lennart@poettering.net + + + + + + nss-mymachines + 8 + + + + nss-mymachines + libnss_mymachines.so.2 + Provide hostname resolution for local + container instances. + + + + libnss_mymachines.so.2 + + + + Description + + nss-mymachines is a plugin + for the GNU Name Service Switch (NSS) functionality of + the GNU C Library (glibc) providing + hostname resolution for containers running locally, + that are registered with + systemd-machined.service8. The + container names are resolved to IP addresses of the + specific container, ordered by their scope. + + To activate the NSS modules, + mymachines has to be added to the + line starting with hosts: in + /etc/nsswitch.conf. + + It is recommended to place + mymachines near the end of the + nsswitch.conf line to make sure + that this mapping is only used as fallback, and any + DNS or /etc/hosts based mapping + takes precedence. + + + + Example + + Here's an example + /etc/nsswitch.conf file, that + enables mymachines + correctly: + +passwd: compat +group: compat +shadow: compat + +hosts: files dns mymachines myhostname +networks: files + +protocols: db files +services: db files +ethers: db files +rpc: db files + +netgroup: nis + + + + + See Also + + systemd1, + systemd-machined.service8, + nss-myhostname8, + nsswitch.conf5, + getent1 + + + + diff --git a/man/systemd-machined.service.xml b/man/systemd-machined.service.xml index 352b4a025..475b53a86 100644 --- a/man/systemd-machined.service.xml +++ b/man/systemd-machined.service.xml @@ -63,8 +63,13 @@ See systemd-nspawn1 - for some examples on how to start a container the systemd - way. + for some examples on how to run containers with OS tools. + + Use + nss-mymachines8 + to make the names of local containers known to + systemd-machined locally resolvable + as host names. See the @@ -78,7 +83,9 @@ systemd1, machinectl1, - systemd.special7. + systemd-nspawn1, + nss-mymachines8, + systemd.special7