Castellanizando Gentoo
Aqui les dejo un pequeño script que tenia por aqui guardado que nos servira para castellanizar Gentoo y otras distribuciones basadas en esta, bueno ahora estoy probando sabayon, me parece excelente y sobre todo esta basado en Gentoo, mas adelante hablare de Sabayon.
He aqui el pequeño script:
#################### castellanizar_gentoo.sh #############################
#!/bin/bash
_USER=`whoami`
_PARAM=$1
_PATH_ENV_LOCALE="/etc/env.d/02locale"
GENERATE-LOCALE(){
_PATH_LOCALE=”/etc/locale.gen”
_PATH_PROFILE=”/etc/profile”
env-update && source $_PATH_PROFILE
echo “Verificando que los cambios han surgido efecto (y)”
env | grep -i LC_
echo “Generando los locales para glibc: xD”
echo “es_ES ISO-8859-15″ >> $_PATH_LOCALE
echo “es_ES@euro ISO-8859-15″ >> $_PATH_LOCALE
echo “es_ES.UTF-8 UTF-8″ >> $_PATH_LOCALE
echo “en_US ISO-8859-1″ >> $_PATH_LOCALE
echo “en_US.UTF-8 UTF-8″ >> $_PATH_LOCALE
locale-gen
echo “Comprobando locale seleccionados (y)”
locale -a
env-update && source $_PATH_PROFILE
}
if [ $_USER != “root” ]; then
echo “Debe ser root xD”
exit
fi
if [ -z $_PARAM ]; then
echo “No se recibio un parametro
”
exit
elif [ $_PARAM == “utf8″ ]; then
echo ‘LC_ALL=”es_ES.UTF8″‘ >> $_PATH_ENV_LOCALE
echo ‘LANG=”es_ES.UTF8″‘ >> $_PATH_ENV_LOCALE
GENERATE-LOCALE
elif [ $_PARAM == “iso” ]; then
echo ‘LC_ALL=”es_ES@euro”‘ >> $_PATH_ENV_LOCALE
echo ‘LANG=”es_ES@euro”‘ >> $_PATH_ENV_LOCALE
GENERATE-LOCALE
else
echo “Entrada no valida
”
exit
fi
####################################################################
Para ejecuarlo solo copienlo y guardenlo en un archivo:
1.- nano castellanizar_gentoo.sh
2.- copy-paste
3.- ctrl-x
4.- Yes/Si
5.- chmod +x castellanizar_gentoo.sh
6.- Para ejecutarlo si se desea con formato utf8: ./castellanizar_gentoo.sh utf8
o para formato iso: ./castellanizar_gentoo.sh iso
Y debe salir algo asi:
delta deepyox # ./castellanizar_gentoo.sh iso
>>> Regenerating /etc/ld.so.cache…
Verificando que los cambios han surgido efecto
LC_ALL=es_ES@euro
Generando los locales para glibc:
* Generating 5 locales (this might take a while) with 1 jobs
* (1/5) Generating es_ES.ISO-8859-15 … [ ok ]
* (2/5) Generating es_ES.ISO-8859-15@euro … [ ok ]
* (3/5) Generating es_ES.UTF-8 … [ ok ]
* (4/5) Generating en_US.ISO-8859-1 … [ ok ]
* (5/5) Generating en_US.UTF-8 … [ ok ]
* Generation complete
Comprobando locale seleccionados
C
en_US
en_US.utf8
es_ES
es_ES@euro
es_ES.utf8
POSIX
>>> Regenerating /etc/ld.so.cache…
delta deepyox # more /etc/locale.gen
es_ES ISO-8859-15
es_ES@euro ISO-8859-15
es_ES.UTF-8 UTF-8
en_US ISO-8859-1
en_US.UTF-8 UTF-8
delta deepyox # more /etc/env.d/02locale
LC_ALL=”es_ES@euro”
LANG=”es_ES@euro”
delta deepyox #
Bueno este script lo uso como parte de otro script que tengo para la instalacion de gentoo desde stage3, espero q le sirva a alguien
Sorry por las caritas, pero tengo la mania de ponerlas cuando programo, xD





