[readonly/geninitrd/devel: 171/334] Merged bootsplash branch.

draenog draenog at pld-linux.org
Sat Nov 2 19:25:53 CET 2013


commit 5b71959c6884a7db8db69e1d9f49e8b7eacccc5d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Dec 25 18:37:25 2003 +0000

    Merged bootsplash branch.
    
    svn-id: @3075

 geninitrd | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
---
diff --git a/geninitrd b/geninitrd
index c6dc943..44774cf 100755
--- 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"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11



More information about the pld-cvs-commit mailing list