[readonly/geninitrd: 509/1068] - less deeper conditions

draenog draenog at pld-linux.org
Sat Nov 2 19:55:11 CET 2013


commit 966c32cc18cfc34358b890e8dead25d1cf72d88a
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Mon Nov 5 08:15:59 2007 +0000

    - less deeper conditions
    
    svn-id: @8990

 geninitrd | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index bf16cb7..8da70f0 100755
--- a/geninitrd
+++ b/geninitrd
@@ -1518,24 +1518,29 @@ initrd_gen_fbsplash() {
 
 	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
+		return
+	fi
+
+	if [ -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 -c $MNTIMAGE -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
+		return
+	fi
+
+	if [ -z "$FB_SPLASH_RESOLUTIONS" ]; then
+		echo >&2 "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/fbsplash."
+		echo >&2 "Not adding fbsplash to initramfs."
+		return
+	fi
+
+	for res in $FB_SPLASH_RESOLUTIONS; do
+		if [ -f "/etc/splash/$SPLASH_THEME/$res.cfg" ]; then
+			/usr/bin/splash_geninitramfs -c $MNTIMAGE -r $res $SPLASH_THEME && \
+			debug "Added $res $SPLASH_THEME theme to initramfs."
 		else
-			echo >&2 "No FB_SPLASH_RESOLUTIONS specified in /etc/sysconfig/fbsplash."
-			echo >&2 "Not adding fbsplash to initramfs."
+			echo >&2 "/etc/splash/$SPLASH_THEME/$res.cfg doesn't exist, skipped"
 		fi
-	fi
+	done
 }
 
 # Generates /dev nodes based on /proc/partitions information.
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list