From 88d5ce3cf26ed18f04c8983bb0687d620b91ad80 Mon Sep 17 00:00:00 2001 From: kprkpr Date: Tue, 31 May 2016 14:22:13 +0200 Subject: [PATCH] changes --- archinstall/archinstall.sh | 11 +++++++++++ archinstall/downloadinstall.sh | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/archinstall/archinstall.sh b/archinstall/archinstall.sh index ac2cc6b..0a4b30e 100755 --- a/archinstall/archinstall.sh +++ b/archinstall/archinstall.sh @@ -11,7 +11,12 @@ local msgd titled=$1 msgd=$2 dialog --title "$titled" --msgbox "$msgd" 15 60 +} +function fatalerror { +razon=$1 +mostrardialog "Error fatal" "Ha occurrido un error fatal, la instalacion se va a detener \n Razon: $razon" +exit } function particiones { @@ -161,8 +166,14 @@ mount /dev/$partefi /mnt/boot/efi/ fi wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/pacman.conf -O /tmp/pacman.conf +if [[ $? != 0 ]];then +fatalerror "Error de conexion con internet, compruebe la red" +fi pacstrap -C /tmp/pacman.conf /mnt/ base wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/chrootinstall.sh -O /mnt/root/chrootinstall.sh +if [[ $? != 0 ]];then +fatalerror "Error de conexion con internet, compruebe la red" +fi chmod +x /mnt/root/chrootinstall.sh genfstab -U /mnt >> /mnt/etc/fstab cp /etc/netctl/* /mnt/etc/netctl/ diff --git a/archinstall/downloadinstall.sh b/archinstall/downloadinstall.sh index d33a330..82bdcd1 100755 --- a/archinstall/downloadinstall.sh +++ b/archinstall/downloadinstall.sh @@ -8,9 +8,20 @@ if [[ $opt = 2 ]];then fi if [[ $opt = 3 ]];then clear - echo "Te sacamos a la terminal, configure internet y asegurese de que funcione (ej: ping 8.8.8.8) y después escriba exit para continuar" + echo "Te sacamos a la terminal, configure internet, asegurese de que funcione y después escriba exit para continuar" bash fi +clear +echo "Vamos a comprobar que tienes conexión a internet" +ping 8.8.8.8 -c3 +if [[ $? != 0 ]];then +clear +echo "No tienes o no has conseguido conexión a internet" +echo "Se va a reiniciar el instalador" +echo "Presione enter para continuar" +read +exec ./downloadinstall.sh +fi wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/archinstall.sh -O archinstall.sh chmod +x archinstall.sh ./archinstall.sh \ No newline at end of file