Author: glen
Date: Fri Apr  3 00:56:19 2009
New Revision: 10291

Added:
   geninitrd/trunk/mod-bootsplash.sh
Modified:
   geninitrd/trunk/Makefile
   geninitrd/trunk/geninitrd
Log:
- bootsplash modularized

Modified: geninitrd/trunk/Makefile
==============================================================================
--- geninitrd/trunk/Makefile    (original)
+++ geninitrd/trunk/Makefile    Fri Apr  3 00:56:19 2009
@@ -1,6 +1,6 @@
 # when making release, make sure you do it as RELEASE document describes
 VERSION                := 10000.3
-MODS           := ide luks multipath dmraid lvm md blkid udev tuxonice suspend 
fbsplash condecor
+MODS           := ide luks multipath dmraid lvm md blkid udev tuxonice suspend 
fbsplash condecor bootsplash
 FILES_MODS  := $(MODS:%=mod-%.sh)
 FILES          := Makefile geninitrd.sysconfig geninitrd functions 
$(FILES_MODS) geninitrd.8 geninitrd.8.xml ChangeLog
 prefix         := /usr

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Fri Apr  3 00:56:19 2009
@@ -31,8 +31,6 @@
 rootdev_nr=0
 # device node for rootfs from fstab
 rootdev=""
-# requires bootsplash package to operate
-BOOT_SPLASH=no
 
 # internal variables
 # is /dev on tmpfs
@@ -702,41 +700,6 @@
        inst_exec /sbin/v86d /sbin
 }
 
-initrd_gen_bootsplash() {
-       local target="$1"
-
-       debug "Generating bootsplash"
-
-       if [ ! -x /bin/splash.bin ]; then
-               warn "Failed to execute /bin/splash.bin. Is bootsplash package 
installed?"
-               return
-       fi
-
-       if [ -r /etc/sysconfig/bootsplash ]; then
-               . /etc/sysconfig/bootsplash
-       fi
-
-       if [ -z "$THEME" ]; then
-               warn "Please configure your /etc/sysconfig/bootsplash first."
-               warn "Generating bootsplashes skipped."
-               return
-       fi
-
-       if [ -z "$BOOT_SPLASH_RESOLUTIONS" ]; then
-               warn "No BOOT_SPLASH_RESOLUTIONS specified in 
/etc/sysconfig/bootsplash."
-               warn "Not adding bootsplash to initrd."
-       fi
-
-       for res in $BOOT_SPLASH_RESOLUTIONS; do
-               if [ -f 
"/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
-                       /bin/splash.bin -s -f 
"/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
-                       debug "Added $res $THEME theme to initrd."
-               else
-                       warn 
"/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, 
skipped"
-               fi
-       done
-}
-
 # Generates /dev nodes based on /proc/partitions information.
 # Needs /proc mounted.
 # Can be called multiple times.
@@ -1147,10 +1110,6 @@
        modext=".ko"
 fi
 
-if is_yes "$FB_SPLASH"  && is_yes "$BOOT_SPLASH"; then
-       warn "bootsplash and fbsplash are exclusive!"
-fi
-
 cache_modprobe_conf
 
 for n in $PREMODS; do

Added: geninitrd/trunk/mod-bootsplash.sh
==============================================================================
--- (empty file)
+++ geninitrd/trunk/mod-bootsplash.sh   Fri Apr  3 00:56:19 2009
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# geninitrd mod: bootsplash
+
+# requires bootsplash package to operate
+BOOT_SPLASH=no
+
+# setup geninitrd module
+# @access      public
+setup_mod_bootsplash() {
+       # NOTE: this check must be also in fbsplash module as the order of 
module load may change
+       if is_yes "$FB_SPLASH"  && is_yes "$BOOT_SPLASH"; then
+               warn "bootsplash and fbsplash are exclusive!"
+       fi
+}
+
+# generate initrd fragment
+# @access      public
+initrd_gen_bootsplash() {
+       local target="$1"
+
+       debug "Generating bootsplash"
+
+       if [ ! -x /bin/splash.bin ]; then
+               warn "Failed to execute /bin/splash.bin. Is bootsplash package 
installed?"
+               return
+       fi
+
+       if [ -r /etc/sysconfig/bootsplash ]; then
+               . /etc/sysconfig/bootsplash
+       fi
+
+       if [ -z "$THEME" ]; then
+               warn "Please configure your /etc/sysconfig/bootsplash first."
+               warn "Generating bootsplashes skipped."
+               return
+       fi
+
+       if [ -z "$BOOT_SPLASH_RESOLUTIONS" ]; then
+               warn "No BOOT_SPLASH_RESOLUTIONS specified in 
/etc/sysconfig/bootsplash."
+               warn "Not adding bootsplash to initrd."
+       fi
+
+       for res in $BOOT_SPLASH_RESOLUTIONS; do
+               if [ -f 
"/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" ]; then
+                       /bin/splash.bin -s -f 
"/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
+                       debug "Added $res $THEME theme to initrd."
+               else
+                       warn 
"/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, 
skipped"
+               fi
+       done
+}
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to