Skip to content

Commit

Permalink
feat(uki-partitioning): respect additional encrypted partition list (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler authored Jan 24, 2024
1 parent e8dbe2f commit 79a577d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/agent/hooks/kcrypt_uki.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package hook

import (
"os"
"strconv"
"strings"
"time"

"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/constants"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
Expand All @@ -9,10 +14,6 @@ import (
"github.com/kairos-io/kairos-sdk/machine"
"github.com/kairos-io/kairos-sdk/utils"
kcrypt "github.com/kairos-io/kcrypt/pkg/lib"
"os"
"strconv"
"strings"
"time"
)

type KcryptUKI struct{}
Expand Down Expand Up @@ -78,7 +79,7 @@ func (k KcryptUKI) Run(c config.Config, _ v1.Spec) error {
return err
}

for _, p := range []string{"COS_OEM", "COS_PERSISTENT"} {
for _, p := range append([]string{"COS_OEM", "COS_PERSISTENT"}, c.Install.Encrypt...) {
c.Logger.Infof("Encrypting %s", p)
utils.SH("udevadm settle") //nolint:errcheck
utils.SH("sync") //nolint:errcheck
Expand Down

0 comments on commit 79a577d

Please sign in to comment.