added locale module and deps
This commit is contained in:
@@ -20,4 +20,4 @@ export FORCEBLANK="no"
|
|||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
export MODULE_LIST="upgrade_dist conf_disks"
|
export MODULE_LIST="upgrade_dist conf_disks conf_locale"
|
||||||
|
|||||||
7
init.sh
7
init.sh
@@ -35,13 +35,6 @@ export LOGFILE=${LOGFILE:-"/var/log/$(uname -n)-$(date +%Y%m%d-%H%M).log"}
|
|||||||
# echo "+kroot::::::::" >> /etc/shadow
|
# echo "+kroot::::::::" >> /etc/shadow
|
||||||
#}
|
#}
|
||||||
|
|
||||||
# Locale
|
|
||||||
conf_locale()
|
|
||||||
{
|
|
||||||
backupdist /etc/locale.gen
|
|
||||||
sed -i "/^# en_US.UTF-8 /s/^# //" /etc/locale.gen
|
|
||||||
locale-gen
|
|
||||||
}
|
|
||||||
|
|
||||||
# Additionnal packages (some are necessary to that script to end successfully)
|
# Additionnal packages (some are necessary to that script to end successfully)
|
||||||
install_pkg()
|
install_pkg()
|
||||||
|
|||||||
22
modules/#conf_locale.sh#
Normal file
22
modules/#conf_locale.sh#
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Locale
|
||||||
|
|
||||||
|
conf_locale()
|
||||||
|
{
|
||||||
|
backupdist /etc/locale.gen
|
||||||
|
for loc in $LOCALESET; do
|
||||||
|
prnt I "Activation de la locale ${loc}..."
|
||||||
|
sed -i "/^# $loc /s/^# //" /etc/locale.gen
|
||||||
|
done
|
||||||
|
prnt I "Régénération du cache de locale..."
|
||||||
|
locale-gen
|
||||||
|
}
|
||||||
|
|
||||||
|
precheck_conf_locale()
|
||||||
|
{
|
||||||
|
if [[ ! $LOCALESET ]]; then
|
||||||
|
prnt W "Aucune locale définie !"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export -f conf_locale
|
||||||
|
export -f precheck_conf_locale
|
||||||
1
modules/.#conf_locale.sh
Symbolic link
1
modules/.#conf_locale.sh
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
fatalerrors@isarog.240485:1622181080
|
||||||
19
modules/conf_locale.sh
Normal file
19
modules/conf_locale.sh
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Locale
|
||||||
|
|
||||||
|
conf_locale()
|
||||||
|
{
|
||||||
|
backupdist /etc/locale.gen
|
||||||
|
for loc in $LOCALESET; do
|
||||||
|
prnt I "Activation de la locale ${loc}..."
|
||||||
|
sed -i "/^# $loc /s/^# //" /etc/locale.gen
|
||||||
|
done
|
||||||
|
prnt I "Régénération du cache de locale..."
|
||||||
|
locale-gen
|
||||||
|
}
|
||||||
|
|
||||||
|
precheck_conf_locale()
|
||||||
|
{
|
||||||
|
if [[ ! $LOCALESET ]]; then
|
||||||
|
prnt W "Aucune locale définie !"
|
||||||
|
fi
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user