mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-04-27 19:28:59 +00:00
seedling: Drop unrequired copy (#683)
Signed-off-by: mudler <mudler@c3os.io> Signed-off-by: mudler <mudler@c3os.io>
This commit is contained in:
parent
544f28c493
commit
f052a4a83c
@ -2,14 +2,12 @@ package hook
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
config "github.com/kairos-io/kairos/pkg/config"
|
||||
"github.com/kairos-io/kairos/pkg/machine"
|
||||
"github.com/kairos-io/kairos/pkg/utils"
|
||||
cp "github.com/otiai10/copy"
|
||||
|
||||
kcryptconfig "github.com/kairos-io/kcrypt/pkg/config"
|
||||
)
|
||||
@ -27,8 +25,6 @@ func (k Kcrypt) Run(c config.Config) error {
|
||||
machine.Umount("/oem") //nolint:errcheck
|
||||
}()
|
||||
|
||||
_ = os.MkdirAll("/oem/system/discovery", 0650)
|
||||
|
||||
kcryptc, err := kcryptconfig.GetConfiguration(kcryptconfig.ConfigScanDirs)
|
||||
if err != nil {
|
||||
fmt.Println("Failed getting kcrypt configuration: ", err.Error())
|
||||
@ -66,18 +62,5 @@ func (k Kcrypt) Run(c config.Config) error {
|
||||
}
|
||||
}
|
||||
|
||||
if c.Install.SkipEncryptCopyPlugins {
|
||||
fmt.Println("Skip discovery plugin copy")
|
||||
return nil
|
||||
}
|
||||
|
||||
err = cp.Copy("/system/discovery", "/oem/system/discovery")
|
||||
if err != nil {
|
||||
fmt.Println("Failed during copying discovery plugins: ", err.Error())
|
||||
if c.FailOnBundleErrors {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user