Skip to content

Commit

Permalink
lvm-luks-format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme committed Nov 4, 2023
1 parent 2311365 commit d580010
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,17 @@ func runSetupOperation(diskLabel, operation string, args []interface{}) error {
for uuid == "" {
uuid, _ = dummyPart.GetUUID()
}
err = MakeFs(&dummyPart)
err = LuksOpen(&dummyPart, fmt.Sprintf("luks-%s", uuid), password)
if err != nil {
return fmt.Errorf("failed to execute operation %s: %s", operation, err)
}
err = LUKSMakeFs(&dummyPart)
if err != nil {
return fmt.Errorf("failed to execute operation %s: %s", operation, err)
}
if len(args) == 4 {
label := args[3].(string)
err := dummyPart.SetLabel(label)
err := LUKSSetLabel(&dummyPart, label)
if err != nil {
return fmt.Errorf("failed to execute operation %s: %s", operation, err)
}
Expand Down

0 comments on commit d580010

Please sign in to comment.