Add wipe option for luks
This commit is contained in:
parent
cb40ecd35e
commit
18fbb016e6
1 changed files with 9 additions and 3 deletions
12
archfi
12
archfi
|
@ -554,13 +554,19 @@ formatdevice(){
|
||||||
options=()
|
options=()
|
||||||
options+=("normal" "")
|
options+=("normal" "")
|
||||||
options+=("fast" "")
|
options+=("fast" "")
|
||||||
sel=$(whiptail --backtitle "$apptitle" --title "Wipe device" --menu "Wipe device (recommended) ?" --no-button="Ignore" 0 0 0 \
|
sel=$(whiptail --backtitle "$apptitle" --title "$txtformatdevice" --menu "Wipe device ?" --cancel-button="Ignore" 0 0 0 \
|
||||||
"${options[@]}" \
|
"${options[@]}" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
case $sel in
|
case $sel in
|
||||||
normal) dd if=/dev/zero of=/dev/mapper/$1 & PID=$! &>/dev/null;;
|
normal)
|
||||||
fast) dd if=/dev/zero of=/dev/mapper/$1 bs=30M & PID=$! &>/dev/null;;
|
echo "dd if=/dev/zero of=/dev/mapper/$1"
|
||||||
|
dd if=/dev/zero of=/dev/mapper/$1 & PID=$! &>/dev/null
|
||||||
|
;;
|
||||||
|
fast)
|
||||||
|
echo "dd if=/dev/zero of=/dev/mapper/$1 bs=60M"
|
||||||
|
dd if=/dev/zero of=/dev/mapper/$1 bs=60M & PID=$! &>/dev/null
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
clear
|
clear
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
Loading…
Reference in a new issue