1
0
mirror of https://gitlab.com/JKANetwork/JKArch.git synced 2026-02-16 18:21:33 +01:00
This commit is contained in:
kprkpr
2016-06-06 08:34:10 +02:00
parent 1446ba1e1d
commit 62d815ce37

View File

@@ -109,10 +109,32 @@ clear
# Solo pedir datos si no esta en modo automatico, evidentemente.
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 "Selecciona disco duro a utilizar para seleccionar las particiones" ; tput setaf 9
options=($(lsblk --output KNAME | cut -c1-3 | sort | uniq | sed '1d' | grep 'sd\|hd'))
select opt in "${options[@]}"
do
case $opt in
*)
if [[ -z $opt ]];then
echo "$(T "Not valid")"
else
hd=$opt
break
fi;;
esac
done
#Detectar tipo de tabla de particiones (gpt o msdos) y si es gpt, preparar para UEFI
tabletype="$(parted /dev/${hd} p | grep "Partition Table" | awk '1 {print $3}')"
if [[ $tabletype -eq "gpt" ]];then
mostrardialog "GPT Partition Table" "Estas usando el estilo de particiones GPT, que utiliza UEFI, recuerda que tendras que tener y seleccionar la particion UEFI del sistema"
fi
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 'sd\|hd' | grep '[1-9]$'))
options=($(lsblk --output KNAME | sed '1d' | grep '${hd}' | grep '[1-9]$'))
select opt in "${options[@]}"
do
case $opt in
@@ -143,7 +165,7 @@ 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 'sd\|hd' | grep '[1-9]$'))
options=($(lsblk --output KNAME | sed '1d' | grep '${hd}' | grep '[1-9]$'))
select opt in "${options[@]}"
do
case $opt in
@@ -202,28 +224,25 @@ if [[ ! $optpa -eq 3 ]];then
clear
opt=`dialog --stdout --nocancel --menu "¿Usaste EFI/UEFI/GPT o es MBR/BIOS?" 0 0 5 1 "MBR/BIOS" 2 "EFI/UEFI/GPT"`
case $opt in
2)
clear
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
tput setaf 6 ; echo "$(T "Select EFI partition")" ; tput setaf 9
options=($(lsblk --output KNAME | sed '1d' | grep 'sd\|hd' | grep '[1-9]$'))
select opt in "${options[@]}"
do
case $opt in
*)
if [[ -z $opt ]];then
echo "$(T "Not valid")"
else
partefi=$opt
break
fi;;
esac
done
;;
esac
if [[ $tabletype -eq "gpt" ]];then
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
tput setaf 6 ; echo "$(T "Select EFI partition")" ; tput setaf 9
options=($(lsblk --output KNAME | sed '1d' | grep 'sd\|hd' | grep '[1-9]$'))
select opt in "${options[@]}"
do
case $opt in
*)
if [[ -z $opt ]];then
echo "$(T "Not valid")"
else
partefi=$opt
break
fi;;
esac
done
fi
fi
#fin del if de pedir los datos si no esta en automatico
}