Move reexec.Init() to beginning of wwctl

- Fixes: #1879

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-08-01 01:08:20 -06:00
parent 073ecdf82c
commit ebc101b2b1
3 changed files with 6 additions and 5 deletions

View File

@@ -7,7 +7,6 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/storage/drivers/copy"
"github.com/containers/storage/pkg/reexec"
"github.com/pkg/errors"
warewulfconf "github.com/warewulf/warewulf/internal/pkg/config"
@@ -68,9 +67,6 @@ func ImportDirectory(uri string, name string) error {
if !util.IsFile(path.Join(uri, "/bin/sh")) {
return errors.New("Source directory has no /bin/sh: " + uri)
}
if reexec.Init() {
return errors.New("couldn't init reexec")
}
err = copy.DirCopy(uri, fullPath, copy.Content, true)
if err != nil {
return err