SVN: geninitrd/branches/devel/geninitrd

czarny czarny at pld-linux.org
Wed Dec 13 12:48:11 CET 2006


Author: czarny
Date: Wed Dec 13 12:48:10 2006
New Revision: 8098

Modified:
   geninitrd/branches/devel/geninitrd
Log:
- full fbsplash support
- added initramfs check for fbsplash
- seems to work
- only udev to go!


Modified: geninitrd/branches/devel/geninitrd
==============================================================================
--- geninitrd/branches/devel/geninitrd	(original)
+++ geninitrd/branches/devel/geninitrd	Wed Dec 13 12:48:10 2006
@@ -1014,6 +1014,16 @@
 	fi
 fi
 
+if is_yes "$FB_SPLASH"; then
+	if is_yes "$BOOT_SPLASH"; then
+		echo >&2 "You can't use both bootsplash and fbsplash! Please choose one."
+		exit 1
+	elif [ "$INITRDFS" != "initramfs" ]; then
+		echo >&2 "FB_SPLASH works only if INITRDFS is initramfs!."
+		exit 1
+	fi
+fi
+
 if [ ! -f /proc/mounts ]; then
 	echo >&2 "WARNING: /proc filesystem not mounted, may cause wrong results or failure."
 fi
@@ -1598,6 +1608,29 @@
 	fi
 fi
 
+if is_yes "$FB_SPLASH"; then
+	if [ ! -x /usr/bin/splash_geninitramfs ]; then
+		echo >&2 "Failed to execute /usr/bin/splash_geninitramfs. Is splashutils package installed?"
+	elif [ -z "$SPLASH_THEME" ]; then
+		echo >&2 "Please configure your /etc/sysconfig/fbsplash first."
+		echo >&2 "Generating fbsplashes skipped."
+	else
+		if [ -n "$FB_SPLASH_RESOLUTIONS" ]; then
+			for res in $FB_SPLASH_RESOLUTIONS; do
+				if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
+					/usr/bin/splash_geninitramfs -a $target -r $res $SPLASH_THEME && \
+					debug "Added $res $SPLASH_THEME theme to initramfs."
+				else
+					echo >&2 "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"
+				fi
+			done
+		else
+			echo >&2 "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/fbsplash."
+			echo >&2 "Not adding fbsplash to initramfs."
+		fi
+	fi
+fi
+
 rm -rf "$MNTIMAGE" "$MNTPOINT" "$IMAGE"
 
 # vim:ts=4:sw=4:noet:fdm=marker


More information about the pld-cvs-commit mailing list