xen/24002-pygrub-grub2.patch
Charles Arnold be167619bc - Upstream pygrub patches for grub2 support and fixes
24000-pygrub-grub2.patch
  24001-pygrub-grub2.patch
  24002-pygrub-grub2.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=191
2012-06-12 20:47:00 +00:00

29 lines
1.2 KiB
Diff

# HG changeset patch
# User Michael Young <m.a.young@durham.ac.uk>
# Date 1319566865 -3600
# Node ID 979bc34d0ad0369e42c70f66a39952e4b6b9b613
# Parent 152049468175f29a3792b3b60e09a841f9cd2c21
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>
Index: xen-4.1.2-testing/tools/pygrub/src/GrubConf.py
===================================================================
--- xen-4.1.2-testing.orig/tools/pygrub/src/GrubConf.py
+++ xen-4.1.2-testing/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,))