mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-26 15:03:47 +01:00
47 lines
1.2 KiB
Bash
Executable File
47 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
#Este script corre en el chroot para configurar todo
|
|
|
|
function horaidioma {
|
|
#Idioma
|
|
echo "Escoja su idioma. Se irá desde la abreviatura general, a la particular"
|
|
options=($(cat /etc/locale.gen | grep '^#[a-ZA-Z]' | cut -c2-30 | cut -f1 -d"_" | sort | uniq))
|
|
select opt in "${options[@]}"
|
|
do
|
|
case $opt in
|
|
*) opclang=$opt;break;;
|
|
esac
|
|
done
|
|
clear
|
|
options=($(cat /etc/locale.gen | grep '^#'$opclang | cut -c2-30 | cut -f1 -d" " | sort | uniq))
|
|
select opt in "${options[@]}"
|
|
do
|
|
case $opt in
|
|
*) opclang=$opt;break;;
|
|
esac
|
|
done
|
|
|
|
langinst=$(cat /etc/locale.gen | grep -m1 '^#'$opclang)
|
|
|
|
echo $langinst >> /etc/locale.gen
|
|
locale-gen
|
|
echo "Ahora seleccione su ubicación/país para ajustar el reloj"
|
|
NEW_TIMEZONE=$(tzselect)
|
|
test -n "$NEW_TIMEZONE" && cp -fp /usr/share/zoneinfo/"$NEW_TIMEZONE" /etc/localtime
|
|
hwclock --systohc --utc
|
|
}
|
|
|
|
|
|
function userpass {
|
|
#Aqui hay que añadir los comandos para crear un usuario, aunque esto correrá dentro del chroot y no aqui
|
|
echo "Contraseña para el usuario root"
|
|
passwd root
|
|
echo "Creemos un nuevo usuario, tu usuario"
|
|
echo "Nombre"
|
|
read nameuser
|
|
|
|
}
|
|
|
|
echo "Configuración de su sistema"
|
|
|
|
horaidioma
|
|
userpass |