Compare commits

...

2 Commits
0.0.6 ... dev

Author SHA1 Message Date
80c87e282b Some infos update 2024-05-07 02:23:49 +02:00
4922d1e369 Some infos update 2024-05-07 02:23:06 +02:00

View File

@ -2,6 +2,7 @@
declare -r DEV="${1}" declare -r DEV="${1}"
declare STARTDATE="" declare STARTDATE=""
declare STARTDATESTRING=""
show_help() { show_help() {
echo "ddwipe dev (/dev/sdX)" echo "ddwipe dev (/dev/sdX)"
@ -37,11 +38,12 @@ confirm_wipe() {
} }
wipe_dev() { wipe_dev() {
STARTDATE="$(date)" STARTDATE=$(date +%s)
STARTDATESTRING="$(date)"
echo "Begin wiping device ${1}" echo "Begin wiping device ${1}"
echo "" echo ""
echo "Start date :" echo "Start date :"
echo "${STARTDATE}" echo "${STARTDATESTRING}"
echo "" echo ""
echo "blkdiscard secure" echo "blkdiscard secure"
if ! blkdiscard -f -p 500M -s -v "${1}"; then if ! blkdiscard -f -p 500M -s -v "${1}"; then
@ -67,7 +69,7 @@ wipe_dev() {
print_time() { print_time() {
echo "" echo ""
echo "Start date :" echo "Start date :"
echo "${STARTDATE}" echo "${STARTDATESTRING}"
ENDDATE=$(date +%s) ENDDATE=$(date +%s)
echo "" echo ""
@ -83,6 +85,5 @@ print_time() {
check_args "${DEV}" check_args "${DEV}"
check_dev_exist "${DEV}" check_dev_exist "${DEV}"
confirm_wipe "${DEV}" confirm_wipe "${DEV}"
STARTDATE=$(date +%s)
wipe_dev "${DEV}" wipe_dev "${DEV}"
print_time print_time