From 3d0b9d6b5f679016f90a77f39d463385560a9a07 Mon Sep 17 00:00:00 2001 From: mtt2hi Date: Tue, 6 Apr 2021 09:41:40 +0000 Subject: [PATCH] systemd-nspawn shall be called with option "--register=no" to prevent error after debootstrap After debootstrap the call of "debos" fails with message "Failed to register machine: Unit machine-root.scope already exists". With the option "--register=no" this works fine. This change is derived from https://gitlab.collabora.com/smcv/flatdeb/-/merge_requests/6 Signed-off-by: mtt2hi Gbp-Pq: Name 0001-systemd-nspawn-shall-be-called-with-option-register-.patch --- commands.go | 1 + 1 file changed, 1 insertion(+) diff --git a/commands.go b/commands.go index 7bf45cc..42ba982 100644 --- a/commands.go +++ b/commands.go @@ -226,6 +226,7 @@ func (cmd Command) Run(label string, cmdline ...string) error { options = append(options, "systemd-nspawn", "-q") options = append(options, "--resolv-conf=off") options = append(options, "--timezone=off") + options = append(options, "--register=no") for _, e := range cmd.extraEnv { options = append(options, "--setenv", e) -- cgit v1.2.3