diff options
-rwxr-xr-x | bin/ata-secure-erase | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ata-secure-erase b/bin/ata-secure-erase index c47f5092..17ec49b7 100755 --- a/bin/ata-secure-erase +++ b/bin/ata-secure-erase @@ -22,7 +22,7 @@ set -x device="" ! test -z "$device" -mount | grep -v "$device" +mount | grep -qv "$device" # sudo scrub "$device" # in case the ATA secure erase actually just # # bricks the device, first erase the device @@ -37,9 +37,11 @@ mount | grep -v "$device" sudo hdparm -I "$device" | grep "not frozen" sudo hdparm --user-master u --security-set-pass Eins "$device" -sudo hdparm -I "$device" | grep -v "not enabled" +sudo hdparm -I "$device" | grep -qv "not enabled" # drive may not support --security-erase-enhanced and so might need to # change following line to use --security-erase +date sudo time hdparm --user-master u --security-erase-enhanced Eins "$device" -sudo hdparm -I "$device" | grep "not enabled" +sudo hdparm -I "$device" | grep -q "not enabled" +date |