]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: support custom container service name
authorIago López Galeiras <iaguis@gmail.com>
Mon, 9 Nov 2015 10:32:34 +0000 (11:32 +0100)
committerIago López Galeiras <iaguis@gmail.com>
Mon, 9 Nov 2015 15:40:05 +0000 (16:40 +0100)
commit6aadfa4c5239f6cd2a80e82f6bc102cc116583df
treed38cfce939d81c7fcff857ef14234aa10c36c0b9
parent2933d599c242ebfc70ddcffe59163916b02270f1
nspawn: support custom container service name

We were hardcoding "systemd-nspawn" as the value of the $container env
variable and "nspawn" as the service string in machined registration.

This commit allows the user to configure it by setting the
$SYSTEMD_NSPAWN_CONTAINER_SERVICE env variable when calling
systemd-nspawn.

If $SYSTEMD_NSPAWN_CONTAINER_SERVICE is not set, we use the string
"systemd-nspawn" for both, fixing the previous inconsistency.
src/nspawn/nspawn-register.c
src/nspawn/nspawn-register.h
src/nspawn/nspawn.c