On Wednesday 26 October 2011 19:49:29 Dave Reisner wrote: > On Thu, Oct 27, 2011 at 01:38:32AM +0200, Tom Gundersen wrote: > > Uglier script, but should now work with zsh as well as bash. > > > > Signed-off-by: Tom Gundersen <[email protected]> > > --- > > > > locale.sh | 77 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files > > changed, 73 insertions(+), 4 deletions(-) > > > > diff --git a/locale.sh b/locale.sh > > index e774659..4b4ef4e 100644 > > --- a/locale.sh > > +++ b/locale.sh > > @@ -1,10 +1,79 @@ > > > > if [ -s /etc/rc.conf ]; then > > > > - LANG=$(. /etc/rc.conf 2> /dev/null ; echo "${LOCALE:=en_US.UTF-8}") > > + LANG=$(. /etc/rc.conf 2> /dev/null ; echo "$LOCALE") > > > > fi > > > > + > > > > if [ -s /etc/locale.conf ]; then > > > > . /etc/locale.conf > > > > fi > > Minor optimization -- check for locale.conf first. If it exists, don't > even read rc.conf. The legacy setting is only ever going to supply LANG, > whereas locale.conf can supply LANG and a lot more.
I did this, but only in the case that LANG is not set in locale.conf, I want LOCALE to still work in the case where someone just set some LC_ var in locale.conf. -t
signature.asc
Description: This is a digitally signed message part.
