nspawn: fix --ephemeral with --machine
authorLuca Boccassi <bluca@debian.org>
Tue, 19 Apr 2022 10:45:26 +0000 (12:45 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 19 Apr 2022 17:33:01 +0000 (02:33 +0900)
commit3603f15171bbc2d650a8942714f6a6a900fb7c60
tree05dc5be4d65831ee222dfea094ad9bb9e944cf66
parent01d9fbccddd694bc584aed24eaa0543f831dc929
nspawn: fix --ephemeral with --machine

Follow-up for https://github.com/systemd/systemd/commit/2362fdde1bd4bf54772383ef29431f683729ba76

When --machine is specified with --ephemeral, no random suffix is added, so
the recently added assert would fail.

Add a top-level variable with the expected file name for nspawn files, and
compute it when the rest of the names are computed.
src/nspawn/nspawn.c
test/units/testsuite-13.sh