From b650dc1b0bd8de062fc72db57d4a9b035e73a6c6 Mon Sep 17 00:00:00 2001 From: Seblu Date: Thu, 27 Jan 2011 07:38:54 +0100 Subject: [PATCH] Add EARLYLOCALE option EARLYLOCALE option set locale during the boot process. By example, this allow to un process in DAEMONS with locale set. --- rc.conf | 3 +++ rc.multi | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/rc.conf b/rc.conf index de182c3..b5a6584 100644 --- a/rc.conf +++ b/rc.conf @@ -7,6 +7,8 @@ # ----------------------------------------------------------------------- # # LOCALE: available languages can be listed with the 'locale -a' command +# EARLYLOCALE: locale is set during the boot process. +# By example, this allow to run process in DAEMONS with locale set. # HARDWARECLOCK: set to "UTC" or "localtime", any other value will result # in the hardware clock being left untouched (useful for virtualization) # TIMEZONE: timezones are found in /usr/share/zoneinfo @@ -16,6 +18,7 @@ # USECOLOR: use ANSI color sequences in startup messages # LOCALE="en_US.UTF-8" +EARLYLOCALE="no" HARDWARECLOCK="localtime" TIMEZONE="Canada/Pacific" KEYMAP="us" diff --git a/rc.multi b/rc.multi index 660f649..9bb1e79 100755 --- a/rc.multi +++ b/rc.multi @@ -11,6 +11,10 @@ run_hook multi_start # Load sysctl variables if sysctl.conf is present [[ -r /etc/sysctl.conf ]] && /sbin/sysctl -q -p &>/dev/null +# Load locale settings +[[ "$EARLYLOCALE" =~ yes|Yes && -r /etc/profile.d/locale.sh ]] && \ + . /etc/profile.d/locale.sh + # Start daemons for daemon in "${DAEMONS[@]}"; do case ${daemon:0:1} in -- 1.7.3.5