aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-28 14:11:31 +0200
committerKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-28 14:28:40 +0200
commit8decd5c4c71ed0ac0df54eba70a4a52c44f08395 (patch)
treeadc85fb5671df52afaa7c4140bc996451af8d6a5 /rc.sysinit
parent3dc96aaa74d7e886adfb097955d39b716001348b (diff)
downloadinitscripts-8decd5c4c71ed0ac0df54eba70a4a52c44f08395.tar.xz
rc.sysinit: Fix setting locale
When using process substitution with status(), the resulting /dev/fd/* might get lost before it is actualy used. This happens in case a custom stat_busy() forks a subshell.
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit5
1 files changed, 3 insertions, 2 deletions
diff --git a/rc.sysinit b/rc.sysinit
index fca8b43..a63da9b 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -238,8 +238,9 @@ stat_done
eval 'echo "$HOSTNAME" > /proc/sys/kernel/hostname'
# Flush old locale settings and set user defined locale
-status "Setting Locale: ${LOCALE:=en_US}" \
- install -Tm 0755 <(echo "export LANG=$LOCALE") /etc/profile.d/locale.sh
+stat_busy "Setting Locale: ${LOCALE:=en_US}"
+ echo "export LANG=$LOCALE" > /etc/profile.d/locale.sh &&
+ chmod 0755 /etc/profile.d/locale.sh && stat_done || stat_fail
if [[ ${LOCALE,,} =~ utf ]]; then
stat_busy "Setting Consoles to UTF-8 mode"