mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-16 18:21:33 +01:00
changes
This commit is contained in:
@@ -109,10 +109,32 @@ clear
|
|||||||
# Solo pedir datos si no esta en modo automatico, evidentemente.
|
# Solo pedir datos si no esta en modo automatico, evidentemente.
|
||||||
if [[ ! $optpa -eq 3 ]];then
|
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
|
tput setaf 6 ; echo "$(T "Your partition scheme")" ; tput setaf 9
|
||||||
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
||||||
tput setaf 6 ; echo "$(T "Select root partition")" ; tput setaf 9
|
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[@]}"
|
select opt in "${options[@]}"
|
||||||
do
|
do
|
||||||
case $opt in
|
case $opt in
|
||||||
@@ -143,7 +165,7 @@ if [[ ! $optpa -eq 3 ]];then
|
|||||||
#Selección de home
|
#Selección de home
|
||||||
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
||||||
tput setaf 6 ; echo "$(T "Select home partition")" ; tput setaf 9
|
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[@]}"
|
select opt in "${options[@]}"
|
||||||
do
|
do
|
||||||
case $opt in
|
case $opt in
|
||||||
@@ -202,28 +224,25 @@ if [[ ! $optpa -eq 3 ]];then
|
|||||||
|
|
||||||
clear
|
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
|
if [[ $tabletype -eq "gpt" ]];then
|
||||||
2)
|
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
||||||
clear
|
tput setaf 6 ; echo "$(T "Select EFI partition")" ; tput setaf 9
|
||||||
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
options=($(lsblk --output KNAME | sed '1d' | grep 'sd\|hd' | grep '[1-9]$'))
|
||||||
tput setaf 6 ; echo "$(T "Select EFI partition")" ; tput setaf 9
|
select opt in "${options[@]}"
|
||||||
options=($(lsblk --output KNAME | sed '1d' | grep 'sd\|hd' | grep '[1-9]$'))
|
do
|
||||||
select opt in "${options[@]}"
|
case $opt in
|
||||||
do
|
*)
|
||||||
case $opt in
|
if [[ -z $opt ]];then
|
||||||
*)
|
echo "$(T "Not valid")"
|
||||||
if [[ -z $opt ]];then
|
else
|
||||||
echo "$(T "Not valid")"
|
partefi=$opt
|
||||||
else
|
break
|
||||||
partefi=$opt
|
fi;;
|
||||||
break
|
esac
|
||||||
fi;;
|
done
|
||||||
esac
|
fi
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
#fin del if de pedir los datos si no esta en automatico
|
#fin del if de pedir los datos si no esta en automatico
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user