Skip to content

Commit

Permalink
command: pass --keep-unit to systemd-nspawn
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sjoerdsimons committed Apr 27, 2022
1 parent 5ed7f50 commit fea1b49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit fea1b49

Please sign in to comment.