[readonly/geninitrd/bootsplash: 173/176] - cosmetics: code is nicer

draenog draenog at pld-linux.org
Sat Nov 2 19:24:47 CET 2013


commit 20b40f5328140c497aed8734cef3a96599a8d7b4
Author: pzurowski <pzurowski at pld-linux.org>
Date:   Tue Dec 23 21:23:19 2003 +0000

    - cosmetics: code is nicer
    
    
    svn-id: @3069

 geninitrd | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 05635b2..673a60d 100755
--- a/geninitrd
+++ b/geninitrd
@@ -988,16 +988,20 @@ else
 fi
 
 if is_yes "$BOOT_SPLASH"; then
-	if [ -x /bin/splash.bin ] && [ -n "$THEME" ]; 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"
+				/bin/splash.bin -s -f "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg" >> "$target" && \
+				echo "Added $res $THEME theme to initrd."
 			else
-				echo "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped"
+				echo "/etc/bootsplash/themes/$THEME/config/bootsplash-$res.cfg doesn't exist, skipped" 1>&2
 			fi
 		done
-	elif [ ! -x /bin/splash.bin ]; then
-		echo "Filed to execute /bin/splash.bin. Is bootsplash package installed?"
 	fi
 fi
 
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list