Confirm swap format
This commit is contained in:
parent
5042322ae2
commit
c0ad4f79fe
1 changed files with 18 additions and 5 deletions
23
archfi
23
archfi
|
@ -527,13 +527,26 @@ formatbootdevice(){
|
|||
pressanykey
|
||||
}
|
||||
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
|
||||
echo "${txtformatingpart//%1/$swapdev} swap"
|
||||
echo "----------------------------------------------"
|
||||
echo "mkswap $swapdev"
|
||||
mkswap $swapdev
|
||||
echo ""
|
||||
pressanykey
|
||||
echo "----------------------------------------------------"
|
||||
case $sel in
|
||||
swap)
|
||||
echo "mkswap $swapdev"
|
||||
mkswap $swapdev
|
||||
echo ""
|
||||
pressanykey
|
||||
;;
|
||||
esac
|
||||
clear
|
||||
}
|
||||
formatdevice(){
|
||||
options=()
|
||||
|
|
Loading…
Reference in a new issue