From f5a1a6db3214099c7e9a76189ecc78e79ee7c869 Mon Sep 17 00:00:00 2001 From: kprkpr Date: Sun, 25 Sep 2016 13:06:53 +0200 Subject: [PATCH] Some checks --- archinstall/chrootinstall.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/archinstall/chrootinstall.sh b/archinstall/chrootinstall.sh index 81234d8..a735a81 100755 --- a/archinstall/chrootinstall.sh +++ b/archinstall/chrootinstall.sh @@ -47,6 +47,9 @@ fi function horaidioma { #Idioma + +while [[ $opclang == "" ]];do + echo "$(T "Select language from general to particular")" options=($(cat /etc/locale.gen | grep '^#[a-zA-Z]' | cut -c2-30 | cut -f1 -d"_" | sort | uniq)) select opt in "${options[@]}" @@ -77,6 +80,12 @@ do done langinst=$(cat /etc/locale.gen | grep -m1 '^#'$opclang | cut -c2-40) +opt=`dialog --stdout --nocancel --menu "$(T "Your language:") $opclang" 0 0 4 1 "Es correcto" 2 "No, editar"` +case $opt in + 2) opclang="";; +esac + +done #End of selecting lang sed -i "s/\#$langinst/$langinst/g" /etc/locale.gen echo "LANG=$opclang" > /etc/locale.conf @@ -86,7 +95,14 @@ echo "KEYMAP=$langabr" > /etc/vconsole.conf locale-gen clear echo "$(T "Now select your timezone for adjusting the clock")" +while [[ $NEW_TIMEZONE == "" ]];do NEW_TIMEZONE=$(tzselect) +opt=`dialog --stdout --nocancel --menu "$(T "Your timezone:") $NEW_TIMEZONE" 0 0 4 1 "Es correcto" 2 "No, editar"` +case $opt in + 2) NEW_TIMEZONE="";; +esac +done + test -n "$NEW_TIMEZONE" && cp -fp /usr/share/zoneinfo/"$NEW_TIMEZONE" /etc/localtime hwclock --systohc --utc echo "$(T "Syncing hour to internet")";