[arch-projects] [PATCH 2/7] config: add /etc/vconsole.conf support

Tom Gundersen teg at jklm.no
Wed Oct 26 19:38:28 EDT 2011


Read KEYMAP, CONSOLEFONT and CONSOLEMAP from vconsole.conf. If they are
set they take precedence over the values in rc.conf.

Signed-off-by: Tom Gundersen <teg at jklm.no>
---
 rc.sysinit |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index 3e5fec9..f82368a 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -240,6 +240,10 @@ if [[ $HOSTNAME ]]; then
 	echo "$HOSTNAME" >| /proc/sys/kernel/hostname && stat_done || stat_fail
 fi
 
+if [[ -s /etc/locale.conf ]]; then
+	. /etc/locale.conf
+	[[ $LANG ]] && LOCALE=$LANG
+fi
 if [[ ${LOCALE,,} =~ utf ]]; then
 	stat_busy "Setting Consoles to UTF-8 mode"
 		# UTF-8 consoles are default since 2.6.24 kernel
@@ -261,6 +265,11 @@ else
 		echo 0 >| /sys/module/vt/parameters/default_utf8
 	stat_done
 fi
+
+if [[ -s /etc/vconsole.conf ]]; then
+	[[ $FONT ]] && CONSOLEFONT=$FONT
+	[[ $FONT_MAP ]] && CONSOLEMAP=$FONT_MAP
+fi
 [[ $KEYMAP ]] &&
 	status "Loading Keyboard Map: $KEYMAP" loadkeys -q $KEYMAP
 
-- 
1.7.7.1



More information about the arch-projects mailing list