diff --git a/archinstall/archinstall.sh b/archinstall/archinstall.sh index 5fd0b8f..705b859 100755 --- a/archinstall/archinstall.sh +++ b/archinstall/archinstall.sh @@ -135,10 +135,13 @@ if [[ ! $optpa -eq 3 ]];then tput setaf 6 ; echo "$(T "Your partition scheme")" ; tput setaf 9 lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL tput setaf 6 ; echo "$(T "Select root partition")" ; tput setaf 9 - options=($(lsblk --output KNAME | sed '1d' | grep '${hd}' | grep '[1-9]$')) + options=($(lsblk --output KNAME | sed '1d' | grep '${hd}' | grep '[1-9]$') "Salir") select opt in "${options[@]}" do case $opt in + "Salir") + mostrardialog "Instalacion detenida" "Se ha detenido la instalacion, se apagara el ordenador" + poweroff *) if [[ -z $opt ]];then echo "$(T "Not valid")" @@ -148,8 +151,6 @@ if [[ ! $optpa -eq 3 ]];then fi;; esac done - pause - exit optfr=`dialog --stdout --nocancel --menu "Formato para la particion raiz(/)" 0 0 4 1 "EXT4 (Recomendado)" 2 "BTRFS" 3 "No formatear (Si ya esta formateada)"` case $optfr in 1) @@ -168,10 +169,12 @@ if [[ ! $optpa -eq 3 ]];then #Selección de home lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL tput setaf 6 ; echo "$(T "Select home partition")" ; tput setaf 9 - options=($(lsblk --output KNAME | sed '1d' | grep '${hd}' | grep '[1-9]$')) + options=($(lsblk --output KNAME | sed '1d' | grep '${hd}' | grep '[1-9]$') "No elegir") select opt in "${options[@]}" do case $opt in + "No elegir") + break;; *) if [[ -z $opt ]];then echo "$(T "Not valid")" @@ -181,19 +184,22 @@ if [[ ! $optpa -eq 3 ]];then fi;; esac done - - optfh=`dialog --stdout --nocancel --menu "Formato para la particion home (/home)" 0 0 4 1 "EXT4 (Recomendado)" 2 "BTRFS" 3 "XFS" 4 "No formatear (Si ya esta formateada)"` - case $optfh in - 1) - formatohome="mkfs.ext4 -F";; - 2) - formatohome="mkfs.btrfs -f";; - 3) - formatohome="mkfs.xfs -f";; - 4) - formatohome="echo No formatear ";; - esac - ;; + + if [[ $particionhome ]];then + optfh=`dialog --stdout --nocancel --menu "Formato para la particion home (/home)" 0 0 4 1 "EXT4 (Recomendado)" 2 "BTRFS" 3 "XFS" 4 "No formatear (Si ya esta formateada)"` + case $optfh in + 1) + formatohome="mkfs.ext4 -F";; + 2) + formatohome="mkfs.btrfs -f";; + 3) + formatohome="mkfs.xfs -f";; + 4) + formatohome="echo No formatear ";; + esac + ;; + fi + esac if [[ $formatoraiz -eq "mkfs.btrfs -f" ]];then