]> 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 Jackson <Ian.Jackson@eu.citrix.com>
Wed, 17 Jul 2013 10:58:08 +0000 (11:58 +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>
(cherry picked from commit d513814db6af2b298b8776d7ffc5fb1261e176f4)

tools/pygrub/src/GrubConf.py

index c4f543d1963e8bd6cd692d237fef82031d965990..237d4d7b4513516371cd22fc5ab1dc350a6e6694 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,))