[arch-projects] [initscripts][PATCH 1/2] locale: make sure LANG is always set as this is used in vconsole-setup to decide if we want utf8 mode
Reported-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Tom Gundersen <teg@jklm.no> --- rc.sysinit | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rc.sysinit b/rc.sysinit index 71eea91..4ce5ae5 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -67,7 +67,8 @@ udevd_modprobe sysinit if [[ -s /etc/locale.conf ]]; then parse_envfile /etc/locale.conf "LANG" - [[ $LANG ]] && LOCALE=$LANG +elif [[ $LOCALE ]]; then + export LANG=$LOCALE fi status 'Configuring Virtual Consoles' /usr/lib/systemd/systemd-vconsole-setup -- 1.7.10.4
Export LANG as early as possible. Then start the log. Then setup the console. Signed-off-by: Tom Gundersen <teg@jklm.no> --- rc.sysinit | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 4ce5ae5..a0bbaa6 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -6,6 +6,12 @@ . /etc/rc.conf . /etc/rc.d/functions +if [[ -s /etc/locale.conf ]]; then + parse_envfile /etc/locale.conf "LANG" +elif [[ $LOCALE ]]; then + export LANG=$LOCALE +fi + echo " " printhl "Arch Linux\n" printhl "${C_H2}http://www.archlinux.org" @@ -26,6 +32,11 @@ mountpoint -q /dev/shm || mount /dev/shm &>/dev/null || mountpoint -q /proc/sys/fs/binfmt_misc || mount /proc/sys/fs/binfmt_misc &>/dev/null || mount -t binfmt_misc binfmt /proc/sys/fs/binfmt_misc +# log all console messages +bootlogd -p /run/bootlogd.pid + +status 'Configuring Virtual Consoles' /usr/lib/systemd/systemd-vconsole-setup + if [[ ! -e /run/initramfs/root-fsck ]]; then # remount root ro to allow for fsck later on, we remount now to # make sure nothing can open files rw on root which would block a remount @@ -35,9 +46,6 @@ fi run_hook sysinit_start -# log all console messages -bootlogd -p /run/bootlogd.pid - HWCLOCK_PARAMS="--systz" case $HARDWARECLOCK in "") ;; @@ -65,14 +73,6 @@ fi # Start/trigger UDev, load MODULES and settle UDev udevd_modprobe sysinit -if [[ -s /etc/locale.conf ]]; then - parse_envfile /etc/locale.conf "LANG" -elif [[ $LOCALE ]]; then - export LANG=$LOCALE -fi - -status 'Configuring Virtual Consoles' /usr/lib/systemd/systemd-vconsole-setup - # bring up the loopback interface [[ -d /sys/class/net/lo ]] && status "Bringing up loopback interface" ip link set up dev lo -- 1.7.10.4
participants (1)
-
Tom Gundersen