wipe: use inst_needed

merge-requests/273/head
Bernhard Landauer 7 years ago
parent 3cb00a9726
commit 52f57fd335

@ -66,14 +66,9 @@ secure_wipe() {
# Warn the user. If they proceed, wipe the selected device.
DIALOG " $_PartOptWipe " --yesno "$_AutoPartWipeBody1 ${DEVICE} $_AutoPartWipeBody2" 0 0
if [[ $? -eq 0 ]]; then
clear
# Install wipe where not already installed. Much faster than dd
if [[ ! -e /usr/bin/wipe ]]; then
pacman -Sy --noconfirm wipe 2>$ERR
check_for_error "install wipe" $?
fi
inst_needed wipe
clear
wipe -Ifre ${DEVICE} 2>$ERR
check_for_error "wipe ${DEVICE}" $?

@ -388,6 +388,7 @@ inst_needed() {
if [[ ! $(pacman -Q $1) ]]; then
DIALOG "$_InstPkg" --infobox "$_InstPkg \'${1}\'" 0 0
sleep 2
clear
pacman -Sy --noconfirm $1 2>$ERR
check_for_error "Install needed pkg $1." $?
fi

Loading…
Cancel
Save