Skip to contentSkip to conversation

Add very basic module functionality to dracut.

PATCH In review initramfs mailing list 1 participant 1 message Feb 16, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 42/50 Add very basic module functionality to dracut.

Gitweb:     http://git.kernel.org/?p=linux/kernel/git/davej/dracut.git;a=commit;h=15136762359cdf316bfdb62a20d07196b854f417
Commit:     15136762359cdf316bfdb62a20d07196b854f417
Parent:     3359c8da847c6c5607f5d854e01ab347baa85fc4
Author:     Victor Lowther <[email protected]>
AuthorDate: Fri Feb 13 04:43:12 2009 -0800
Committer:  Dave Jones <[email protected]>
CommitDate: Mon Feb 16 13:56:42 2009 -0500

[PATCH 42/50] Add very basic module functionality to dracut.

Move the i18n stuff to it.

---
 dracut                |   45 +++----------------------------------
 dracut-functions      |    2 -
 modules/10redhat-i18n |   59 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 43 deletions(-)
dracut +4 -41
index 1042a0a..3e3d6f7 100755
@@ -98,47 +98,10 @@ done
 # terminfo bits make things work better if you fall into interactive mode
 for f in $(find /lib/terminfo -type f) ; do cp  --parents $f "$initdir" ; done
 
-## this stuff should be moved out of the main dracut script
-
-# FIXME: i18n stuff isn't really distro-independent :/
-if [[ -f /etc/sysconfig/keyboard || -f /etc/sysconfig/console/default.kmap ]]; then
-    if [ -f /etc/sysconfig/console/default.kmap ]; then
-        KEYMAP=/etc/sysconfig/console/default.kmap
-    else
-        . /etc/sysconfig/keyboard
-        [[ $KEYTABLE && -d /lib/kbd/keymaps ]] && KEYMAP="$KEYTABLE.map"
-    fi
-    if [[ $KEYMAP ]]; then
-        [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard
-        inst /bin/loadkeys
-        findkeymap $KEYMAP
-
-        for FN in $KEYMAPS; do
-            inst $FN
-            case $FN in
-                *.gz) gzip -d "$initdir$FN" ;;
-                *.bz2) bzip2 -d "$initdir$FN" ;;
-            esac
-        done
-    fi
-fi
-
-if [ -f /etc/sysconfig/i18n ]; then
-    . /etc/sysconfig/i18n
-    inst /etc/sysconfig/i18n
-    [[ $SYSFONT ]] || SYSFONT=latarcyrheb-sun16
-    inst /bin/setfont
-
-    for FN in /lib/kbd/consolefonts/$SYSFONT.* ; do
-        inst "$FN"
-        case $FN in
-            *.gz) gzip -d "$initdir$FN" ;;
-            *.bz2) bzip2 -d "$initdir$FN" ;;
-        esac
-    done
-    [[ $SYSFONTACM ]] && inst /lib/kbd/consoletrans/$SYSFONTACM
-    [[ $UNIMAP ]] && inst /lib/kbd/unimaps/$UNIMAP
-fi
+# source any third-party package provided modules
+for f in "$dsrc/modules"/*; do
+    [[ -x $f ]] && . "$f"
+done
 
 ## final stuff that has to happen
 
dracut-functions +0 -2
index 52ef722..8beba8b 100755
@@ -120,10 +120,8 @@ inst_symlink() {
     inst "$realsrc" && ln -s "$realsrc" "$target"
 }
 
-
 # general purpose installation function
 # Same args as above.
-# Just tries to install as a binary, a shell script, then a simple data file.
 inst() {
     if (($# != 1 && $# != 2)); then
         echo "usage: inst <file> <root> [<destination file>]"
modules/10redhat-i18n new file +59 -0

59 lines not on this page · raw message

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html