[node-patches] Change in ovirt-node[master]: only create grub splashscreen when file exists

jboggs at redhat.com jboggs at redhat.com
Tue Dec 11 00:30:29 UTC 2012


Joey Boggs has uploaded a new change for review.

Change subject: only create grub splashscreen when file exists
......................................................................

only create grub splashscreen when file exists

rhbz#826860

Change-Id: I808c1b82498276c76a28f345e21d368b72b2878a
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M scripts/ovirtnode/install.py
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/34/9834/1

diff --git a/scripts/ovirtnode/install.py b/scripts/ovirtnode/install.py
index 15cec4d..6296519 100755
--- a/scripts/ovirtnode/install.py
+++ b/scripts/ovirtnode/install.py
@@ -105,7 +105,7 @@
 default saved
 timeout 5
 hiddenmenu
-splashimage=(hd0,%(partN)s)/grub/splash.xpm.gz
+%(splashscreen)s
 title %(product)s %(version)s-%(release)s
     root (hd0,%(partN)d)
     kernel /vmlinuz0 %(root_param)s %(bootparams)s
@@ -140,7 +140,13 @@
                 GRUB_EFIONLY_CONFIG = """%(efi_hd)s"""
                 GRUB_CONFIG_TEMPLATE = GRUB_EFIONLY_CONFIG + GRUB_CONFIG_TEMPLATE
                 self.grub_dict['efi_hd'] = "device (hd0) " + matches.group(1)
-            GRUB_CONFIG_TEMPLATE % self.grub_dict
+        if os.path.exists("/live/EFI/BOOT/splash.xpm.gz"):
+            splashscreen = "splashimage=(hd0,%s)/grub/splash.xpm.gz" \
+                % self.partN
+        else:
+            splashscreen = ""
+        self.grub_dict["splashscreen"] = splashscreen
+        GRUB_CONFIG_TEMPLATE % self.grub_dict
         grub_conf = open(self.grub_config_file, "w")
         grub_conf.write(GRUB_CONFIG_TEMPLATE % self.grub_dict)
         if self.oldtitle is not None:


--
To view, visit http://gerrit.ovirt.org/9834
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I808c1b82498276c76a28f345e21d368b72b2878a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>



More information about the node-patches mailing list