aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub
diff options
context:
space:
mode:
authorMichael Young <m.a.young@durham.ac.uk>2011-10-25 19:21:05 +0100
committerMichael Young <m.a.young@durham.ac.uk>2011-10-25 19:21:05 +0100
commitb23177b1772ac1fa61b90efaf2380af9b7fa3e9a (patch)
treebd8a64f0d043bc89120506e35a80d6332d036a83 /tools/pygrub
parent0c385b2eff8ba3cfeec367d70a26e68e860fa4bb (diff)
downloadxen-b23177b1772ac1fa61b90efaf2380af9b7fa3e9a.tar.gz
xen-b23177b1772ac1fa61b90efaf2380af9b7fa3e9a.tar.bz2
xen-b23177b1772ac1fa61b90efaf2380af9b7fa3e9a.zip
pyrgrub: cope with configurations with set default="${saved_entry}" line
Fedora 16 grub2 configuration file can have lines like set default="${saved_entry}" and a string containing an integer is expected Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r--tools/pygrub/src/GrubConf.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index a31e30a46f..c4f543d196 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -425,6 +425,8 @@ class Grub2ConfigFile(_GrubConfigFile):
if self.commands.has_key(com):
if self.commands[com] is not None:
+ if arg.strip() == "${saved_entry}":
+ arg = "0"
setattr(self, self.commands[com], arg.strip())
else:
logging.info("Ignored directive %s" %(com,))