aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--initscripts.spec1
-rwxr-xr-xlang.sh50
3 files changed, 30 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 7ae2f92f..c24162fc 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ install:
install -m755 setsysfont $(ROOT)/sbin
install -m755 lang.sh $(ROOT)/etc/profile.d
mkdir -p $(ROOT)/etc/sysconfig
+ mkdir -p $(ROOT)/etc/sysconfig/console
install -m644 sysconfig/init $(ROOT)/etc/sysconfig/init
cp -af rc.d sysconfig ppp $(ROOT)/etc
mkdir -p $(ROOT)/sbin
diff --git a/initscripts.spec b/initscripts.spec
index 3df7b6f0..7320b146 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -113,6 +113,7 @@ rm -rf $RPM_BUILD_ROOT
%config /etc/sysconfig/network-scripts/ifdown-post
/etc/sysconfig/network-scripts/ifup
%config /sbin/ifup
+%dir /etc/sysconfig/console
%config /etc/sysconfig/network-scripts/network-functions
%config /etc/sysconfig/network-scripts/ifup-post
%config /etc/sysconfig/network-scripts/ifcfg-lo
diff --git a/lang.sh b/lang.sh
index 466dcb78..0be0f594 100755
--- a/lang.sh
+++ b/lang.sh
@@ -2,24 +2,23 @@
if [ -f /etc/sysconfig/i18n ]; then
. /etc/sysconfig/i18n
+ [ -n "$LANG" ] && export LANG || unset LANG
+ [ -n "$LC_CTYPE" ] && export LC_CTYPE || unset LC_CTYPE
+ [ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE
+ [ -n "$LC_MESSAGES" ] && export LC_MESSAGES || unset LC_MESSAGES
+ [ -n "$LC_NUMERIC" ] && export LC_NUMERIC || unset LC_NUMERIC
+ [ -n "$LC_MONETARY" ] && export LC_MONETARY || unset LC_MONETARY
+ [ -n "$LC_TIME" ] && export LC_TIME || unset LC_TIME
+ [ -n "$LC_ALL" ] && export LC_ALL || unset LC_ALL
+ [ -n "$LANGUAGE" ] && export LANGUAGE || unset LANGUAGE
+ [ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
- if [ -n "$LANG" ]; then
- export LANG
- fi
-
- if [ -n "$LC_ALL" ]; then
- export LC_ALL
- fi
-
- if [ -n "$LINGUAS" ]; then
- export LINGUAS
- fi
-
+ # deprecated
if [ -n "$SYSTERM" ]; then
export TERM=$SYSTERM
fi
- # Set console font map.
+ # Set console font map, but should be loaded by font.
if [ -n "$UNIMAP" ]; then
loadunimap $UNIMAP
fi
@@ -38,15 +37,22 @@ if [ -f /etc/sysconfig/i18n ]; then
;;
esac
fi
-
- if [ -n "$SYSTERM" ] ; then
- case $SYSTERM in
- linux-lat)
- LESSCHARSET=latin1
- INPUTRC=/etc/inputrc
- export LESSCHARSET INPUTRC
- ;;
- esac
+
+ if [ -n "$INPUTRC" ]; then
+ export INPUTRC
+ elif [ "$TERM" = "linux-lat" ]; then
+ INPUTRC=/etc/inputrc
+ export INPUTRC
+ fi
+
+ if [ -n "$LESSCHARSET" ]; then
+ export LESSCHARSET
+ elif [ "$TERM" = "linux-lat" ]; then
+ LESSCHARSET=latin1
+ export LESSCHARSET
fi
+
+ [ -n "$_XKB_CHARSET" ] && export _XKB_CHARSET || unset _XKB_CHARSET
+
unset SYSFONTACM
fi