Skip to contentSkip to conversation

Replace inst function with a family of specialized functions

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

lore
Share & tools
lore
#0 lore raw

PATCH 24/50 Replace inst function with a family of specialized functions

Gitweb:     http://git.kernel.org/?p=linux/kernel/git/davej/dracut.git;a=commit;h=36b24d7c532c257ef8171c8fc39e7618784f6195
Commit:     36b24d7c532c257ef8171c8fc39e7618784f6195
Parent:     6fa0c3d60b73661645399e370fc035e81bd4ff63
Author:     Victor Lowther <[email protected]>
AuthorDate: Fri Feb 13 04:42:28 2009 -0800
Committer:  Dave Jones <[email protected]>
CommitDate: Mon Feb 16 13:56:41 2009 -0500

[PATCH 24/50] Replace inst function with a family of specialized functions

This makes things shorter and easier to read.

---
 dracut           |   20 ++++----
 dracut-functions |  140 +++++++++++++++++++++++++++---------------------------
 init             |    2 +-
 3 files changed, 81 insertions(+), 81 deletions(-)
dracut +10 -10
index 018b5aa..8bebbd6 100755
@@ -50,7 +50,7 @@ udevexe="/lib/udev/vol_id /lib/udev/console_init"
 
 # install base files
 for binary in $exe $debugexe $udevexe $lvmexe $cryptexe ; do
-  inst $binary "$initdir"
+  inst $binary
 done
 
 # FIXME: would be nice if we didn't have to know which rules to grab....
@@ -73,12 +73,12 @@ if [[ -f /etc/sysconfig/keyboard || -f /etc/sysconfig/console/default.kmap ]]; t
         [[ $KEYTABLE && -d /lib/kbd/keymaps ]] && KEYMAP="$KEYTABLE.map"
     fi
     if [[ $KEYMAP ]]; then
-        [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard "$initdir"
-        inst /bin/loadkeys "$initdir"
+        [ -f /etc/sysconfig/keyboard ] && inst /etc/sysconfig/keyboard
+        inst /bin/loadkeys
         findkeymap $KEYMAP
 
         for FN in $KEYMAPS; do
-            inst $FN "$initdir"
+            inst $FN
             case $FN in
                 *.gz) gzip -d "$initdir$FN" ;;
                 *.bz2) bzip2 -d "$initdir$FN" ;;
@@ -89,19 +89,19 @@ fi
 
 if [ -f /etc/sysconfig/i18n ]; then
     . /etc/sysconfig/i18n
-    inst /etc/sysconfig/i18n "$initdir"
+    inst /etc/sysconfig/i18n
     [[ $SYSFONT ]] || SYSFONT=latarcyrheb-sun16
-    inst /bin/setfont "$initdir"
+    inst /bin/setfont
 
     for FN in /lib/kbd/consolefonts/$SYSFONT.* ; do
-        inst "$FN" "$initdir"
+        inst "$FN"
         case $FN in
             *.gz) gzip -d "$initdir$FN" ;;
             *.bz2) bzip2 -d "$initdir$FN" ;;
         esac
     done
-    [[ $SYSFONTACM ]] && inst /lib/kbd/consoletrans/$SYSFONTACM "$initdir"
-    [[ $UNIMAP ]] && inst /lib/kbd/unimaps/$UNIMAP "$initdir"
+    [[ $SYSFONTACM ]] && inst /lib/kbd/consoletrans/$SYSFONTACM
+    [[ $UNIMAP ]] && inst /lib/kbd/unimaps/$UNIMAP
 fi
 
 # install our files
@@ -113,7 +113,7 @@ for d in etc proc sys sysroot dev/pts; do mkdir -p "$initdir/$d"; done
 # FIXME: hard-coded module list of doom.
 [[ $modules ]] || modules="=ata =block =drm dm-crypt aes sha256 cbc"
 
-instmod $modules
+instmods $modules
 
 /sbin/depmod -a -b "$initdir" $kernel || {
     error "\"/sbin/depmod -a $kernel\" failed."
dracut-functions +70 -70

180 lines not on this page · raw message

init +1 -1
index 599f8ad..d5095ea 100755
@@ -44,7 +44,7 @@ mknod /dev/tty1 c 4 1
 
 # start plymouth if it's available
 # arguably we need some of udev run first for fbmods and above devnodes :/
-[ -x /bin/plymouthd ] && plymouthd --attach-to-session
+[ -x /bin/plymouthd ] && plymouthd
 [ -x /bin/plymouth ] && plymouth --show-splash
 
 

--
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