Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
80c87e282b | |||
4922d1e369 |
@ -2,6 +2,7 @@
|
||||
|
||||
declare -r DEV="${1}"
|
||||
declare STARTDATE=""
|
||||
declare STARTDATESTRING=""
|
||||
|
||||
show_help() {
|
||||
echo "ddwipe dev (/dev/sdX)"
|
||||
@ -37,11 +38,12 @@ confirm_wipe() {
|
||||
}
|
||||
|
||||
wipe_dev() {
|
||||
STARTDATE="$(date)"
|
||||
STARTDATE=$(date +%s)
|
||||
STARTDATESTRING="$(date)"
|
||||
echo "Begin wiping device ${1}"
|
||||
echo ""
|
||||
echo "Start date :"
|
||||
echo "${STARTDATE}"
|
||||
echo "${STARTDATESTRING}"
|
||||
echo ""
|
||||
echo "blkdiscard secure"
|
||||
if ! blkdiscard -f -p 500M -s -v "${1}"; then
|
||||
@ -67,7 +69,7 @@ wipe_dev() {
|
||||
print_time() {
|
||||
echo ""
|
||||
echo "Start date :"
|
||||
echo "${STARTDATE}"
|
||||
echo "${STARTDATESTRING}"
|
||||
|
||||
ENDDATE=$(date +%s)
|
||||
echo ""
|
||||
@ -83,6 +85,5 @@ print_time() {
|
||||
check_args "${DEV}"
|
||||
check_dev_exist "${DEV}"
|
||||
confirm_wipe "${DEV}"
|
||||
STARTDATE=$(date +%s)
|
||||
wipe_dev "${DEV}"
|
||||
print_time
|
||||
|
Loading…
Reference in New Issue
Block a user