]> xenbits.xensource.com Git - xen.git/commitdiff
pygrub/GrubConf: fix boot problem for fedora 19 grub.cfg (2nd attempt)
authorMarcel J.E. Mol <marcel@mesa.nl>
Mon, 24 Jun 2013 16:21:32 +0000 (18:21 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 27 Jun 2013 11:07:02 +0000 (12:07 +0100)
Booting a fedora 19 domU failed because a it could not properly
parse the grub.cfg file. This was cased by

set default="${next_entry}"

This statement actually is within an 'if' statement, so maybe it would
be better to skip code within if/fi blocks...
But this patch seems to work fine.

Signed-off-by: Marcel Mol <marcel@mesa.nl>
Acked-by: Ian Campbell <ian.campbell@citix.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
tools/pygrub/src/GrubConf.py

index 629951f9410926ff8eb44807cfe0f9de90c8f808..6324c625febec9febdc65d5a812046f3f086882f 100644 (file)
@@ -427,6 +427,8 @@ class Grub2ConfigFile(_GrubConfigFile):
                 if self.commands[com] is not None:
                     if arg.strip() == "${saved_entry}":
                         arg = "0"
+                    elif arg.strip() == "${next_entry}":
+                        arg = "0"
                     setattr(self, self.commands[com], arg.strip())
                 else:
                     logging.info("Ignored directive %s" %(com,))