mirror of
https://github.com/kairos-io/kcrypt.git
synced 2025-09-03 07:54:49 +00:00
Use kairos logger from sdk (#437)
This commit is contained in:
@@ -8,23 +8,23 @@ import (
|
||||
"github.com/anatol/luks.go"
|
||||
"github.com/jaypipes/ghw"
|
||||
"github.com/jaypipes/ghw/pkg/block"
|
||||
"github.com/kairos-io/kairos-sdk/types"
|
||||
"github.com/kairos-io/kairos-sdk/utils"
|
||||
"github.com/kairos-io/kcrypt/pkg/bus"
|
||||
configpkg "github.com/kairos-io/kcrypt/pkg/config"
|
||||
"github.com/mudler/go-pluggable"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
// UnlockAll Unlocks all encrypted devices found in the system
|
||||
func UnlockAll(tpm bool) error {
|
||||
logger := log.Logger
|
||||
logger := types.NewKairosLogger("kcrypt-unlock", "info", false)
|
||||
|
||||
return UnlockAllWithLogger(tpm, logger)
|
||||
}
|
||||
|
||||
func UnlockAllWithLogger(tpm bool, logger zerolog.Logger) error {
|
||||
func UnlockAllWithLogger(tpm bool, log types.KairosLogger) error {
|
||||
bus.Manager.Initialize()
|
||||
logger := log.Logger
|
||||
|
||||
config, err := configpkg.GetConfiguration(configpkg.ConfigScanDirs)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user