From b603bf95b18c60fba4d6aa3ad2cb597c197ca6b5 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 11 Aug 2012 04:29:29 +0200 Subject: move archlinux(7) and locale.sh to filesystem The new locale.sh makes DAEMON_LOCALE redundant, so we remove that functionality. A post-upgrade notice will be added. The new functionality will apply the settings to /etc/locale.conf system-wide, and allow each user to override it in $HOME/.config/locale.conf. Signed-off-by: Tom Gundersen --- functions | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'functions') diff --git a/functions b/functions index e8ff7b8..448d2d1 100644 --- a/functions +++ b/functions @@ -5,11 +5,10 @@ # sanitize PATH (will be overridden later when /etc/profile is sourced but is useful for udev) export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -localevars=(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY - LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE - LC_MEASUREMENT LC_IDENTIFICATION LC_ALL) +# clear the TZ envvar, so daemons always respect /etc/localtime +unset TZ -vconsolevars=(KEYMAP KEYMAP_TOGGLE FONT FONT_MAP FONT_UNIMAP) +. /etc/profile.d/locale.sh if [[ $1 == "start" ]]; then if [[ $STARTING ]]; then @@ -66,12 +65,6 @@ if (( $? != 3 )); then fi unset TERM_COLORS -# clear the TZ envvar, so daemons always respect /etc/localtime -unset TZ - -# sanitize the locale settings -unset "${localevars[@]}" - parse_envfile() { local file=$1 validkeys=("${@:2}") ret=0 lineno=0 key= val= local -r quotes=$'[\'"]' comments=$'[;#]*' @@ -723,15 +716,6 @@ if (( RC_FUNCTIONS_HOOK_FUNCS_DEFINED != 1 )); then declare -r RC_FUNCTIONS_HOOK_FUNCS_DEFINED=1 fi -if [[ $DAEMON_LOCALE != [nN][oO] ]]; then - export LANG=${LOCALE:-C} - if [[ -r /etc/locale.conf ]]; then - parse_envfile /etc/locale.conf "${localevars[@]}" - fi -else - export LANG=C -fi - # set colors if [[ $USECOLOR != [nN][oO] ]]; then if tput setaf 0 &>/dev/null; then -- cgit v1.2.3