]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
Merged bootsplash branch.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 25 Dec 2003 18:37:25 +0000 (18:37 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 25 Dec 2003 18:37:25 +0000 (18:37 +0000)
svn-id: @3075

geninitrd

index c6dc943ae6127abc62bc141bcc29d34b87785d61..44774cff2163c5d28fbf5877c32aea7250d34819 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -36,13 +36,15 @@ raidtab="/etc/raidtab"
 fstab="/etc/fstab"
 insmod="insmod"
 modext=".o"
+# default bootsplash is off, if it have to be on, install bootsplash package
+BOOT_SPLASH=no
 
 usage () {
        echo "usage: `basename $0` [--version] [-v] [-f] [--ifneeded] [--preload <module>]" 1>&2
        echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]" 1>&2
        echo "       [--initrdfs=rom|ext2|cram] [--modules-conf=<modules.conf>]" 1>&2
        echo "       [--with-raidstart] [--without-raidstart] [--with-insmod-static]" 1>&2
-       echo "       [--with-mdadm-static]" 1>&2
+       echo "       [--with-mdadm-static] [--without-bootsplash]" 1>&2
        echo "       <initrd-image> <kernel-version>" 1>&2
        echo "       (ex: `basename $0` /boot/initrd-2.2.5-15.img 2.2.5-15)" 1>&2
        exit 1
@@ -600,6 +602,10 @@ if [ -r /etc/sysconfig/geninitrd ] ; then
        . /etc/sysconfig/geninitrd
 fi
 
+if [ -r /etc/sysconfig/bootsplash ] ; then
+       . /etc/sysconfig/bootsplash
+fi
+
 if [ "x" = "x$INITRDFS" ] ; then
        if [ "x" = "x$FS" ] ; then
                # default value
@@ -657,6 +663,9 @@ while [ $# -gt 0 ]; do
        --without-insmod-static)
                USEINSMODSTATIC="no"
                ;;
+       --without-bootsplash)
+               BOOT_SPLASH="no"
+               ;;
        --with=*)
                BASICMODULES="$BASICMODULES `echo $1 | awk -F= '{print $2;}'`"
                ;;
@@ -980,4 +989,23 @@ if is_yes "$COMPRESS" ; then
 else
        cp -a "$IMAGE" "$target"
 fi
+
+if is_yes "$BOOT_SPLASH"; then
+       if [ ! -x /bin/splash.bin ]; then
+               echo "Failed to execute /bin/splash.bin. Is bootsplash package installed?" 1>&2
+       elif [ -z "$THEME" ]; then
+               echo "Please configure your /etc/sysconfig/bootsplash first." 1>&2
+               echo "Generating bootsplashes skipped." 1>&2
+       else
+               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" && \
+                               [ -n "$verbose" ] && echo "Added $res $THEME theme to initrd."
+                       else
+                               echo "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped" 1>&2
+                       fi
+               done
+       fi
+fi
+
 rm -rf "$MNTIMAGE" "$MNTPOINT" "$IMAGE"
This page took 0.040608 seconds and 4 git commands to generate.