Author: glen
Date: Tue Apr 28 09:01:58 2009
New Revision: 10339

Modified:
   geninitrd/trunk/mod-bootsplash.sh
   geninitrd/trunk/mod-condecor.sh
   geninitrd/trunk/mod-fbsplash.sh
Log:
- cosmetics and setup like other mods

Modified: geninitrd/trunk/mod-bootsplash.sh
==============================================================================
--- geninitrd/trunk/mod-bootsplash.sh   (original)
+++ geninitrd/trunk/mod-bootsplash.sh   Tue Apr 28 09:01:58 2009
@@ -8,6 +8,11 @@
 # setup geninitrd module
 # @access      public
 setup_mod_bootsplash() {
+       bootsplash_geninitramfs=$(find_tool /bin/splash.bin)
+       if [ ! -x "$bootsplash_geninitramfs" ]; then
+               BOOT_SPLASH=no
+       fi
+
        # 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!"
@@ -41,9 +46,10 @@
                warn "Not adding bootsplash to initrd."
        fi
 
+       local res
        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" && \
+                       $bootsplash_geninitramfs -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"

Modified: geninitrd/trunk/mod-condecor.sh
==============================================================================
--- geninitrd/trunk/mod-condecor.sh     (original)
+++ geninitrd/trunk/mod-condecor.sh     Tue Apr 28 09:01:58 2009
@@ -8,6 +8,11 @@
 # setup geninitrd module
 # @access      public
 setup_mod_condecor() {
+       condecor_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs 
/usr/bin/splash_geninitramfs)
+       if [ ! -x "$condecor_geninitramfs" ]; then
+               FB_CON_DECOR=no
+       fi
+
        if is_yes "$FB_CON_DECOR" && [ "$INITRDFS" != "initramfs" ]; then
                warn "Using fbcondecor requires INITRDFS=initramfs; skipping 
fbcondecor generation"
                FB_CON_DECOR=no
@@ -19,14 +24,6 @@
 initrd_gen_fbcondecor() {
        debug "Generating fbcondecor"
 
-       if [ ! -x /usr/bin/splash_geninitramfs -a ! -x 
/usr/sbin/splash_geninitramfs ]; then
-               warn "Failed to find splash_geninitramfs. Is splashutils 
package installed?"
-               return
-       fi
-
-       local splash_geninitramfs_bin=/usr/sbin/splash_geninitramfs
-       [ -f /usr/bin/splash_geninitramfs ] && 
splash_geninitramfs_bin=/usr/bin/splash_geninitramfs
-
        if [ -r /etc/sysconfig/splash ]; then
                . /etc/sysconfig/splash
        fi
@@ -43,9 +40,10 @@
                return
        fi
 
+       local res
        for res in $FB_SPLASH_RESOLUTIONS; do
                if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
-                       $splash_geninitramfs_bin -c $DESTDIR -r $res 
$SPLASH_THEME && \
+                       $condecor_geninitramfs -c $DESTDIR -r $res 
$SPLASH_THEME && \
                        debug "Added $res $SPLASH_THEME theme to initramfs."
                else
                        warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, 
skipped"

Modified: geninitrd/trunk/mod-fbsplash.sh
==============================================================================
--- geninitrd/trunk/mod-fbsplash.sh     (original)
+++ geninitrd/trunk/mod-fbsplash.sh     Tue Apr 28 09:01:58 2009
@@ -8,6 +8,12 @@
 # setup geninitrd module
 # @access      public
 setup_mod_fbsplash() {
+       fbsplash_geninitramfs=$(find_tool /usr/sbin/splash_geninitramfs 
/usr/bin/splash_geninitramfs)
+       if [ ! -x "$fbsplash_geninitramfs" ]; then
+               FB_SPLASH=no
+               return
+       fi
+
        if is_yes "$FB_SPLASH" && [ "$INITRDFS" != "initramfs" ]; then
                warn "Using fbsplash requires INITRDFS=initramfs; skipping 
fbsplash generation"
                FB_SPLASH=no
@@ -34,13 +40,6 @@
 initrd_gen_fbsplash() {
        debug "Generating fbsplash"
 
-       if [ ! -x /usr/bin/splash_geninitramfs -a ! -x 
/usr/sbin/splash_geninitramfs ]; then
-               warn "Failed to find splash_geninitramfs. Is splashutils 
package installed?"
-               return
-       fi
-       local splash_geninitramfs_bin=/usr/sbin/splash_geninitramfs
-       [ -f /usr/bin/splash_geninitramfs ] && 
splash_geninitramfs_bin=/usr/bin/splash_geninitramfs
-
        if [ -r /etc/sysconfig/fbsplash ]; then
                . /etc/sysconfig/fbsplash
        fi
@@ -57,9 +56,10 @@
                return
        fi
 
+       local res
        for res in $FB_SPLASH_RESOLUTIONS; do
                if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
-                       $splash_geninitramfs_bin -c $DESTDIR -r $res 
$SPLASH_THEME && \
+                       $fbsplash_geninitramfs -c $DESTDIR -r $res 
$SPLASH_THEME && \
                        debug "Added $res $SPLASH_THEME theme to initramfs."
                else
                        warn "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, 
skipped"
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to