nspawn: make the hostname of the container explicitly configurable with a new --hostn...
authorLennart Poettering <lennart@poettering.net>
Mon, 7 May 2018 16:37:32 +0000 (18:37 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 17 May 2018 18:46:45 +0000 (20:46 +0200)
commit3a9530e5f19565a9cadb7f20bd987c61e0e7c377
treef0ecc881eb1ed00d3a57ec7ce472c356e514c6cc
parent5a4ff98840fba01f9eb1bed23846ae8d1ca796b5
nspawn: make the hostname of the container explicitly configurable with a new --hostname= switch

Previously, the container's hostname was exclusively initialized from
the machine name configured with --machine=, i.e. the internal name and
the external name used for and by the container was synchronized. This
adds a new option --hostname= that optionally allows the internal name
to deviate from the external name.

This new option is mainly useful to ultimately implement the OCI runtime
spec directly in nspawn, but it might be useful on its own for some
other usecases too.
man/systemd-nspawn.xml
man/systemd.nspawn.xml
src/nspawn/nspawn-gperf.gperf
src/nspawn/nspawn-settings.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn.c