diff options
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/init.d/functions | 4 | ||||
-rwxr-xr-x | rc.d/rc | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 580216d1..25b9d1e2 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -18,8 +18,10 @@ export PATH [ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="`/sbin/consoletype`" -if [ -f /etc/sysconfig/i18n -a -z "${NOLOCALE:-}" ] ; then +if [ -f /etc/sysconfig/i18n -a -z "${NOLOCALE:-}" -a -z "${LANGSH_SOURCED:-}" ] ; then . /etc/profile.d/lang.sh + # avoid propagating LANGSH_SOURCED any further + unset LANGSH_SOURCED fi # Read in our configuration @@ -42,6 +42,13 @@ fi # Is there an rc directory for this new runlevel? [ -d /etc/rc$runlevel.d ] || exit 0 +# Set language, vc settings once to avoid doing it for every init script +# through functions +if [ -f /etc/sysconfig/i18n -a -z "${NOLOCALE:-}" ] ; then + . /etc/profile.d/lang.sh + export LANGSH_SOURCED=1 +fi + # First, run the KILL scripts. for i in /etc/rc$runlevel.d/K* ; do check_runlevel "$i" || continue |