Merge pull request #1412 from anderbubble/FixPanicOnCntImprt
Fix panic on container import
This commit is contained in:
@@ -56,6 +56,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Correctly extract smbios asset key during Grub boot. #1291
|
||||
- Refactor of `wwinit/init` to more properly address rootfs options. #1098
|
||||
- Fix autodetected kernel sorting issue. #1332
|
||||
- Avoid panic on container import #1244
|
||||
|
||||
## v4.5.7, 2024-09-11
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ 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"
|
||||
@@ -67,7 +68,9 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user