From fea1b4957f29b44a9084b32290ed4f9f69bfb1a6 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Tue, 26 Apr 2022 22:06:46 +0200 Subject: [PATCH] command: pass --keep-unit to systemd-nspawn keep-unit will avoid nspawn trying to create a transient unit cope, which isn't really needed or relevant for our usage of systemd-nspawn. It also avoids issues when running without systemd in particular when running without fakemachine support in a docker container Signed-off-by: Sjoerd Simons --- commands.go | 1 + 1 file changed, 1 insertion(+) diff --git a/commands.go b/commands.go index 42ba982d..c8430fb0 100644 --- a/commands.go +++ b/commands.go @@ -227,6 +227,7 @@ func (cmd Command) Run(label string, cmdline ...string) error { options = append(options, "--resolv-conf=off") options = append(options, "--timezone=off") options = append(options, "--register=no") + options = append(options, "--keep-unit") for _, e := range cmd.extraEnv { options = append(options, "--setenv", e)