mirror of
https://github.com/kairos-io/kcrypt.git
synced 2025-09-02 23:46:32 +00:00
Incorporating feedback review
This commit is contained in:
30
main.go
30
main.go
@@ -287,20 +287,24 @@ func unlockAll() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
block, err := ghw.Block()
|
block, err := ghw.Block()
|
||||||
if err == nil {
|
if err != nil {
|
||||||
for _, disk := range block.Disks {
|
fmt.Printf("Warning: Error reading partitions '%s \n", err.Error())
|
||||||
for _, p := range disk.Partitions {
|
|
||||||
if p.Type == "crypto_LUKS" {
|
return nil
|
||||||
if partitionInfo != nil {
|
}
|
||||||
p.Label = partitionInfo.LookupLabelForUUID(p.UUID)
|
|
||||||
}
|
for _, disk := range block.Disks {
|
||||||
fmt.Printf("Unmounted Luks found at '%s' LABEL '%s' \n", p.Name, p.Label)
|
for _, p := range disk.Partitions {
|
||||||
err = multierror.Append(err, unlockDisk(p))
|
if p.Type == "crypto_LUKS" {
|
||||||
if err != nil {
|
if partitionInfo != nil {
|
||||||
fmt.Printf("Unlocking failed: '%s'\n", err.Error())
|
p.Label = partitionInfo.LookupLabelForUUID(p.UUID)
|
||||||
}
|
|
||||||
time.Sleep(10 * time.Second)
|
|
||||||
}
|
}
|
||||||
|
fmt.Printf("Unmounted Luks found at '%s' LABEL '%s' \n", p.Name, p.Label)
|
||||||
|
err = multierror.Append(err, unlockDisk(p))
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Unlocking failed: '%s'\n", err.Error())
|
||||||
|
}
|
||||||
|
time.Sleep(10 * time.Second)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user