Confirm swap format

This commit is contained in:
MatMoul 2018-09-04 00:57:16 +02:00
parent 5042322ae2
commit c0ad4f79fe

23
archfi
View file

@ -527,13 +527,26 @@ formatbootdevice(){
pressanykey pressanykey
} }
formatswapdevice(){ formatswapdevice(){
options=()
options+=("swap" "")
sel=$(whiptail --backtitle "$apptitle" --title "$txtformatdevice" --menu "${txtselectpartformat//%1/$1 ($2)}" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
return 1
fi
clear clear
echo "${txtformatingpart//%1/$swapdev} swap" echo "${txtformatingpart//%1/$swapdev} swap"
echo "----------------------------------------------" echo "----------------------------------------------------"
echo "mkswap $swapdev" case $sel in
mkswap $swapdev swap)
echo "" echo "mkswap $swapdev"
pressanykey mkswap $swapdev
echo ""
pressanykey
;;
esac
clear
} }
formatdevice(){ formatdevice(){
options=() options=()