Identation and end status + 500M step
This commit is contained in:
parent
87be64e61b
commit
8504eafa48
11
mtm-ddwipe
11
mtm-ddwipe
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -r DEV="${1}"
|
||||
declare STARTDATE="$(date)"
|
||||
|
||||
show_help() {
|
||||
echo "ddwipe dev (/dev/sdX)"
|
||||
@ -39,13 +40,13 @@ wipe_dev() {
|
||||
echo "Begin wiping device ${1}"
|
||||
echo ""
|
||||
echo "Start date :"
|
||||
date
|
||||
echo "${STARTDATE}"
|
||||
echo ""
|
||||
echo "blkdiscard secure"
|
||||
if ! blkdiscard -f -p 100G -s -v "${1}"; then
|
||||
if ! blkdiscard -f -p 500M -s -v "${1}"; then
|
||||
echo ""
|
||||
echo "blkdiscard zero"
|
||||
if ! blkdiscard -f -p 100G -z -v "${1}"; then
|
||||
if ! blkdiscard -f -p 500M -z -v "${1}"; then
|
||||
echo ""
|
||||
echo "dd zero"
|
||||
if ! dd if=/dev/zero of="${1}" bs=1M status=progress; then
|
||||
@ -63,6 +64,10 @@ wipe_dev() {
|
||||
}
|
||||
|
||||
print_time() {
|
||||
echo ""
|
||||
echo "Start date :"
|
||||
echo "${STARTDATE}"
|
||||
|
||||
ENDDATE=$(date +%s)
|
||||
echo ""
|
||||
echo "End date :"
|
||||
|
Loading…
Reference in New Issue
Block a user