|
@@ -139,15 +139,9 @@ func (m *Manager) WipeDisk(diskPath string) error {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // Wipe all filesystem signatures on each of the partitions
|
|
|
- wipeCmd1 := exec.Command("sudo", "wipefs", "--all", "--force", diskPath+"?")
|
|
|
- if err := wipeCmd1.Run(); err != nil {
|
|
|
- return fmt.Errorf("error wiping filesystem signatures on %s?: %v", diskPath, err)
|
|
|
- }
|
|
|
-
|
|
|
// Wipe all filesystem signatures on the entire disk
|
|
|
- wipeCmd2 := exec.Command("sudo", "wipefs", "--all", "--force", diskPath)
|
|
|
- if err := wipeCmd2.Run(); err != nil {
|
|
|
+ wipeCmd := exec.Command("sudo", "wipefs", "--all", "--force", diskPath)
|
|
|
+ if err := wipeCmd.Run(); err != nil {
|
|
|
return fmt.Errorf("error wiping filesystem signatures on %s: %v", diskPath, err)
|
|
|
}
|
|
|
|