summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2016-04-08 13:22:54 +0200
committerMichal Sekletar <msekleta@redhat.com>2016-04-11 16:43:16 +0200
commite01ff70a77e781734e1e73a2238af2e9bf7967a8 (patch)
tree8235651af0b93081b1db89026bdbc061540263ee /Makefile.am
parent710a8858a930a13da8dabbba61d64eb8f420b448 (diff)
nspawn: always setup machine id
We check /etc/machine-id of the container and if it is already populated we use value from there, possibly ignoring value of --uuid option from the command line. When dealing with R/O image we setup transient machine id. Once we determined machine id of the container, we use this value for registration with systemd-machined and we also export it via container_uuid environment variable. As registration with systemd-machined is done by the main nspawn process we communicate container machine id established by setup_machine_id from outer child to the main process by unix domain socket. Similarly to PID of inner child.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index d670ae1984..eb99c34fb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3028,7 +3028,9 @@ systemd_nspawn_SOURCES = \
src/core/mount-setup.c \
src/core/mount-setup.h \
src/core/loopback-setup.c \
- src/core/loopback-setup.h
+ src/core/loopback-setup.h \
+ src/core/machine-id-setup.c \
+ src/core/machine-id-setup.h
nodist_systemd_nspawn_SOURCES = \
src/nspawn/nspawn-gperf.c