diff --git a/CHANGELOG.md b/CHANGELOG.md index de7f076c..e3c24be1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fixed a bug when cloning an overlay to site when parent is missing - Fixed `wwctl upgrade nodes` to properly handle kernel argument lists. #1938 -- Improved netplan support. #1873 +- Fixed a panic during `wwctl overlay edit` due to missing `reexec.Init()`. #1879 ## v4.6.2, 2025-07-09 diff --git a/cmd/wwctl/main.go b/cmd/wwctl/main.go index 8e4dabba..a0696367 100644 --- a/cmd/wwctl/main.go +++ b/cmd/wwctl/main.go @@ -4,10 +4,15 @@ import ( "fmt" "os" + "github.com/containers/storage/pkg/reexec" "github.com/warewulf/warewulf/internal/app/wwctl" ) func main() { + if reexec.Init() { + return + } + root := wwctl.GetRootCommand() err := root.Execute() diff --git a/internal/pkg/image/imprt.go b/internal/pkg/image/imprt.go index c49f2b1c..8e8f37bd 100644 --- a/internal/pkg/image/imprt.go +++ b/internal/pkg/image/imprt.go @@ -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