Let's change our splash checking to a global check so it only needs to be done once...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 28 Feb 2008 17:33:29 +0000 (17:33 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 28 Feb 2008 17:33:29 +0000 (17:33 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1342 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/support/bootloader-setup.sh

index ae432c0943c3b577fbd1f282a8137e50417f0afa..3af54be87355062a70a189007a5391367a01f456 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  28 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/support/bootloader-setup.sh:
+  Let's change our splash checking to a global check so it only needs to be
+  done once. This makes much more sense than having all of those if ... else
+  ... statements.
+
   28 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/stage1/stage1-chroot.sh, targets/support/kmerge.sh:
   Fix our USE invocation here so things work as expected.
index 2f57df24ed28f73d7f34af91b1ceb08e93f1bb5b..04d67c0d95720006251b4d395bdd138f701e5106 100755 (executable)
@@ -11,6 +11,7 @@ check_bootargs
 check_filesystem_type
 
 default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot"
+[ -n "${clst_splash_theme}" ] && default_append_line="${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet"
 
 case ${clst_hostarch} in
        alpha)
@@ -81,12 +82,7 @@ case ${clst_hostarch} in
 
                        echo "label=${x}" >> ${icfg}
                        echo "read-write" >> ${icfg}
-                       if [ -n "${clst_livecd_splash_theme}" ]
-                       then
-                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet\"" >> ${icfg}
-                       else
-                               echo "append=\"${default_append_line}\"" >> ${icfg}
-                       fi
+                       echo "append=\"${default_append_line}\"" >> ${icfg}
                done
        ;;
        ppc64)
@@ -136,12 +132,7 @@ case ${clst_hostarch} in
 
                                        echo "label=${x}" >> ${etc_icfg}
                                        echo "read-write" >> ${icfg}
-                                       if [ -n "${clst_livecd_splash_theme}" ]
-                                       then
-                                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet\"" >> ${etc_icfg}
-                                       else
-                                               echo "append=\"${default_append_line}\"" >> ${etc_icfg}
-                                       fi
+                                       echo "append=\"${default_append_line}\"" >> ${etc_icfg}
 
                                        for y in ${clst_kernel_console}
                                        do
@@ -169,12 +160,7 @@ case ${clst_hostarch} in
 
                                        echo "label=${x}" >> ${etc_icfg}
                                        echo "read-write" >> ${etc_icfg}
-                                       if [ -n "${clst_livecd_splash_theme}" ]
-                                       then
-                                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet\"" >> ${etc_icfg}
-                                       else
-                                               echo "append=\"${default_append_line}\"" >> ${etc_icfg}
-                                       fi
+                                       echo "append=\"${default_append_line}\"" >> ${etc_icfg}
                                fi
                        else
                                if [ -n "${clst_kernel_console}" ]
@@ -189,12 +175,7 @@ case ${clst_hostarch} in
 
                                        echo "label=${x}" >> ${icfg}
                                        echo "read-write" >> ${icfg}
-                                       if [ -n "${clst_livecd_splash_theme}" ]
-                                       then
-                                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet\"" >> ${icfg}
-                                       else
-                                               echo "append=\"${default_append_line}\"" >> ${icfg}
-                                       fi
+                                       echo "append=\"${default_append_line}\"" >> ${icfg}
                                        
                                        for y in ${clst_kernel_console}
                                        do
@@ -221,12 +202,7 @@ case ${clst_hostarch} in
 
                                        echo "label=${x}" >> ${icfg}
                                        echo "read-write" >> ${icfg}
-                                       if [ -n "${clst_livecd_splash_theme}" ]
-                                       then
-                                               echo "append=\"${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet\"" >> ${icfg}
-                                       else
-                                               echo "append=\"${default_append_line}\"" >> ${icfg}
-                                       fi
+                                       echo "append=\"${default_append_line}\"" >> ${icfg}
                                fi
                        fi
                done
@@ -336,12 +312,7 @@ case ${clst_hostarch} in
                                        do
                                                echo "label ${x}-${y}" >> ${icfg}
                                                echo "  kernel ${x}" >> ${icfg}
-                                               if [ -n "${clst_livecd_splash_theme}" ]
-                                               then
-                                                       echo "  append ${default_append_line} softlevel=${y} initrd=${x}.igz vga=791 splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" >> ${icfg}
-                                               else
-                                                       echo "  append ${default_append_line} softlevel=${y} initrd=${x}.igz vga=791" >> ${icfg}
-                                               fi
+                                               echo "  append ${default_append_line} softlevel=${y} initrd=${x}.igz vga=791" >> ${icfg}
 
                                                echo >> ${icfg}
                                                echo "   ${x}" >> ${kmsg}
@@ -354,12 +325,7 @@ case ${clst_hostarch} in
                                else
                                        echo "label ${x}" >> ${icfg}
                                        echo "  kernel ${x}" >> ${icfg}
-                                       if [ -n "${clst_livecd_splash_theme}" ]
-                                       then
-                                               echo "  append ${default_append_line} initrd=${x}.igz vga=791 splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" >> ${icfg}
-                                       else
-                                               echo "  append ${default_append_line} initrd=${x}.igz vga=791" >> ${icfg}
-                                       fi
+                                       echo "  append ${default_append_line} initrd=${x}.igz vga=791" >> ${icfg}
                                        echo >> ${icfg}
                                        echo "   ${x}" >> ${kmsg}
                                        echo "label ${x}-nofb" >> ${icfg}
@@ -436,12 +402,7 @@ case ${clst_hostarch} in
                                        for y in ${clst_kernel_softlevel}
                                        do
                                                echo "title ${x}-${y}" >> ${icfg}
-                                               if [ -n "${clst_livecd_splash_theme}" ]
-                                               then
-                                                       echo "kernel /boot/${x} softlevel=${y} ${default_append_line} vga=791 splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" >> ${icfg}
-                                               else
-                                                       echo "  append ${default_append_line} softlevel=${y} initrd=${x}.igz vga=791" >> ${icfg}
-                                               fi
+                                               echo "  append ${default_append_line} softlevel=${y} initrd=${x}.igz vga=791" >> ${icfg}
                                                if [ -e $1/boot/${x}.igz ]
                                                then
                                                        echo "initrd /boot/${x}.igz" >> ${icfg}
@@ -457,12 +418,7 @@ case ${clst_hostarch} in
                                        done
                                else
                                        echo "title ${x}" >> ${icfg}
-                                       if [ -n "${clst_livecd_splash_theme}" ]
-                                       then
-                                               echo "kernel /boot/${x} ${default_append_line} vga=791 splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet" >> ${icfg}
-                                       else
-                                               echo "kernel /boot/${x} ${default_append_line} vga=791" >> ${icfg}
-                                       fi
+                                       echo "kernel /boot/${x} ${default_append_line} vga=791" >> ${icfg}
                                        if [ -e $1/boot/${x}.igz ]
                                        then
                                                echo "initrd /boot/${x}.igz" >> ${icfg}