[node-patches] Change in ovirt-node[master]: check all grub2 config files for menuentry item

jboggs at redhat.com jboggs at redhat.com
Sat Feb 9 02:35:56 UTC 2013


Joey Boggs has uploaded a new change for review.

Change subject: check all grub2 config files for menuentry item
......................................................................

check all grub2 config files for menuentry item

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


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/67/11867/1

diff --git a/scripts/ovirtnode/install.py b/scripts/ovirtnode/install.py
index f07c2c4..25c3bb6 100755
--- a/scripts/ovirtnode/install.py
+++ b/scripts/ovirtnode/install.py
@@ -203,7 +203,7 @@
 set root (hd0,%(partB)d)
 linux /vmlinuz0 root=live:LABEL=RootBackup %(bootparams)s
 initrd /initrd0.img
-    """
+}    """
         logger.info("efi not detected, installing grub2 configuraton")
         if _functions.is_iscsi_install():
             disk = re.sub("p[1,2,3]$", "", \
@@ -296,14 +296,14 @@
             f=open(grub_config_file)
             oldgrub=f.read()
             f.close()
-            if _functions.is_efi_boot():
+            if _functions.is_efi_boot() or "grub.cfg" in grub_config_file:
                 m=re.search("^menuentry (.*)$", oldgrub, re.MULTILINE)
             else:
                 m=re.search("^title (.*)$", oldgrub, re.MULTILINE)
             if m is not None:
                 self.oldtitle=m.group(1)
                 # strip off extra title characters
-                if _functions.is_efi_boot():
+                if _functions.is_efi_boot() or "grub.cfg" in grub_config_file:
                     self.oldtitle = self.oldtitle.replace('"','').strip(" {")
         _functions.system("umount /liveos/efi")
         _functions.system("umount /liveos")


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc6065a077e96b4430aa491a7e22c78b2b876b05
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