FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-05-2008, 07:16 PM
Bill Nottingham
 
Default Do full console initialization in the initrd, not just keymap. (#458362)

With the advent of plymouth, this means that the virtual console may be
in graphics mode. This causes font setting to fail. Since we can't
realistically wait until plymouth finishes to do this, we need to do
the full initialization before plymouth starts. Copy in the font and
any required mappings, and run the udev console setup helper directly.

This removes the special case for loading the keymap, as it's handled
by this.
---
mkinitrd | 49 +++++++++++++++++++++++++++++++++----------------
1 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/mkinitrd b/mkinitrd
index cbf5978..3a9bf0b 100755
--- a/mkinitrd
+++ b/mkinitrd
@@ -1535,9 +1535,10 @@ EOF

if [ $ncryptodevs -ne 0 ]; then
inst /sbin/cryptsetup "$MNTIMAGE"
+fi

- KEYTABLE=
- KEYMAP=
+if [ -f /etc/sysconfig/i18n -o -f /etc/sysconfig/keyboard ]; then
+ I18N=yes
if [ -f /etc/sysconfig/console/default.kmap ]; then
KEYMAP=/etc/sysconfig/console/default.kmap
else
@@ -1548,16 +1549,8 @@ if [ $ncryptodevs -ne 0 ]; then
KEYMAP="$KEYTABLE.map"
fi
fi
-
+ inst /etc/sysconfig/keyboard "$MNTIMAGE"
if [ -n "$KEYMAP" ]; then
- LOADKEYS=loadkeys
- if [ -f /etc/sysconfig/i18n ]; then
- . /etc/sysconfig/i18n
- fi
- if [ "${LANG}" != "${LANG%%.UTF-8}" -o "${LANG}" != "${LANG%%.utf8}" ]; then
- LOADKEYS="loadkeys -u"
- fi
-
inst /bin/loadkeys "$MNTIMAGE"
findkeymap $KEYMAP

@@ -1573,6 +1566,34 @@ if [ $ncryptodevs -ne 0 ]; then
esac
done
fi
+
+ if [ -f /etc/sysconfig/i18n ]; then
+ . /etc/sysconfig/i18n
+ fi
+ inst /etc/sysconfig/i18n "$MNTIMAGE"
+ [ -z "$SYSFONT" ] && SYSFONT=latarcyrheb-sun16
+ if [ -n "$SYSFONT" ]; then
+ inst /bin/setfont "$MNTIMAGE"
+
+ for FN in /lib/kbd/consolefonts/$SYSFONT.* ; do
+ inst $FN "$MNTIMAGE"
+ case "$FN" in
+ *.gz)
+ gzip -d "$MNTIMAGE$FN"
+ ;;
+ *.bz2)
+ bzip2 -d "$MNTIMAGE$FN"
+ ;;
+ esac
+ done
+ if [ -n "$SYSFONTACM" ]; then
+ inst /lib/kbd/consoletrans/$SYSFONTACM "$MNTIMAGE"
+ fi
+ if [ -n "$UNIMAP" ]; then
+ inst /lib/kbd/unimaps/$UNIMAP "$MNTIMAGE"
+ fi
+ fi
+ inst /lib/udev/console_init "$MNTIMAGE"
fi

echo -n >| $RCFILE
@@ -1612,6 +1633,7 @@ fi
for i in 0 1 2 3 ; do
emit "mknod /dev/ttyS$i c 4 $(($i + 64))"
done
+[ -n "$I18N" ] && emit "/lib/udev/console_init tty0"

emit "daemonize --ignore-missing /bin/plymouthd"

@@ -1690,11 +1712,6 @@ emitcrypto()
emit "plymouth ask-for-password --command "cryptsetup luksOpen $1 $2""
}

-if [ -n "$KEYMAP" ]; then
- emit "echo Loading keymap."
- emit "$LOADKEYS $KEYMAP"
-fi
-
for cryptdev in ${!cryptopart@} ; do
emitcrypto `eval echo '$'$cryptdev`
done
--
1.6.0.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org