Move reexec.Init() to beginning of wwctl
- Fixes: #1879 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -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 a bug when cloning an overlay to site when parent is missing
|
||||||
- Fixed `wwctl upgrade nodes` to properly handle kernel argument lists. #1938
|
- 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
|
## v4.6.2, 2025-07-09
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,15 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/containers/storage/pkg/reexec"
|
||||||
"github.com/warewulf/warewulf/internal/app/wwctl"
|
"github.com/warewulf/warewulf/internal/app/wwctl"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
if reexec.Init() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
root := wwctl.GetRootCommand()
|
root := wwctl.GetRootCommand()
|
||||||
|
|
||||||
err := root.Execute()
|
err := root.Execute()
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import (
|
|||||||
|
|
||||||
"github.com/containers/image/v5/types"
|
"github.com/containers/image/v5/types"
|
||||||
"github.com/containers/storage/drivers/copy"
|
"github.com/containers/storage/drivers/copy"
|
||||||
"github.com/containers/storage/pkg/reexec"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
warewulfconf "github.com/warewulf/warewulf/internal/pkg/config"
|
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")) {
|
if !util.IsFile(path.Join(uri, "/bin/sh")) {
|
||||||
return errors.New("Source directory has no /bin/sh: " + uri)
|
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)
|
err = copy.DirCopy(uri, fullPath, copy.Content, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user