Merge pull request #1964 from anderbubble/reexec

Move reexec.Init() to beginning of wwctl
This commit is contained in:
Xu YANG
2025-08-01 16:37:24 +09:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@@ -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

View File

@@ -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()

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