From 5e0288ecf2d6e88db03ad2c31801b3bed77907a8 Mon Sep 17 00:00:00 2001 From: "Marcel J.E. Mol" Date: Mon, 24 Jun 2013 18:21:32 +0200 Subject: pygrub/GrubConf: fix boot problem for fedora 19 grub.cfg (2nd attempt) 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 Acked-by: Ian Campbell Tested-by: Konrad Rzeszutek Wilk (cherry picked from commit d513814db6af2b298b8776d7ffc5fb1261e176f4) --- tools/pygrub/src/GrubConf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py index c4f543d196..237d4d7b45 100644 --- a/tools/pygrub/src/GrubConf.py +++ b/tools/pygrub/src/GrubConf.py @@ -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,)) -- cgit v1.2.3