From 3bbb151378923472ee4341b4aecae05ef99d8845 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 13 Aug 2024 15:26:58 +0200 Subject: [PATCH] change order --- usr/bin/archboot-clean-blockdevice.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr/bin/archboot-clean-blockdevice.sh b/usr/bin/archboot-clean-blockdevice.sh index 0e1121e80..eebe95e52 100755 --- a/usr/bin/archboot-clean-blockdevice.sh +++ b/usr/bin/archboot-clean-blockdevice.sh @@ -8,7 +8,7 @@ _usage() echo -e "\e[1m\e[36mARCHBOOT\e[m \e[1m- Clean blockdevice\e[m" echo -e "\e[1m----------------------------\e[m" echo -e "This script removes all filesystem signatures" - echo -e "and partitiontable from the device." + echo -e "and partition table from the device." echo -e "\e[1m\e[91mWARNING: ALL DATA WILL BE LOST ON THE DEVICE(S)! \e[m" echo "" echo -e "Usage: \e[1m${_BASENAME} \e[m" @@ -21,14 +21,14 @@ if ! [[ ${UID} -eq 0 ]]; then echo "ERROR: Please run as root user!" exit 1 fi +echo -e "\e[1mCleaning blockdevice(s) $*...\e[m" +echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on ${i} now! \e[m" +sleep 10 #shellcheck disable=SC2068 for i in $@; do - echo -e "\e[1mCleaning blockdevice ${i}...\e[m" - echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on ${i} now! \e[m" - sleep 10 - echo -e "\e[1mSTEP 1/2:\e[m Cleaning filesystem signatures..." + echo -e "\e[1mSTEP 1/2:\e[m Cleaning ${i} filesystem signatures..." wipefs -f -a "${i}" - echo -e "\e[1mSTEP 2/2:\e[m Cleaning partition table..." + echo -e "\e[1mSTEP 2/2:\e[m Cleaning ${i} partition table..." dd if=/dev/zero of="${i}" bs=1M count=10 echo -e "\e[1mFinished ${i}.\e[m" done