diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-12-31 14:37:49 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-12-31 14:37:49 +0000 |
commit | 25934a3e73c7cdaf12074621f5273f8d3f3b0409 (patch) | |
tree | d360e48a6e338714884c729881da458878dd02c8 | |
parent | d938ce700191a82dc4748491936a01b399ebb866 (diff) | |
download | dotfiles-25934a3e73c7cdaf12074621f5273f8d3f3b0409.tar.gz |
fix use of grep -v
-rwxr-xr-x | bin/ata-secure-erase | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ata-secure-erase b/bin/ata-secure-erase index f272ea32..7cf89759 100755 --- a/bin/ata-secure-erase +++ b/bin/ata-secure-erase @@ -22,7 +22,7 @@ set -x device="" ! test -z "$device" -mount | grep -qv "$device" +! ( mount | grep -q "$(basename $device)" ) # sudo scrub "$device" # in case the ATA secure erase actually just # # bricks the device, first erase the device @@ -37,7 +37,7 @@ mount | grep -qv "$device" sudo hdparm -I "$device" | grep -q "not frozen" sudo hdparm --user-master u --security-set-pass Eins "$device" -sudo hdparm -I "$device" | grep -qv "not enabled" +! ( sudo hdparm -I "$device" | grep -q "not enabled" ) # drive may not support --security-erase-enhanced and so might need to # change following line to use --security-erase |