xcp-1.6-updates/xen-4.1.hg

changeset 23212:49d73f014077

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>

xen-unstable changeset: 24002:979bc34d0ad0
Backport-requested-by: Pasi Karkkainen <pasik@iki.fi>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Michael Young <m.a.young@durham.ac.uk>
date Tue Jan 10 17:08:27 2012 +0000 (2012-01-10)
parents c404dbf9b3c6
children 22ea8496051d
files tools/pygrub/src/GrubConf.py
line diff
     1.1 --- a/tools/pygrub/src/GrubConf.py	Tue Jan 10 17:08:22 2012 +0000
     1.2 +++ b/tools/pygrub/src/GrubConf.py	Tue Jan 10 17:08:27 2012 +0000
     1.3 @@ -425,6 +425,8 @@ class Grub2ConfigFile(_GrubConfigFile):
     1.4                  
     1.5              if self.commands.has_key(com):
     1.6                  if self.commands[com] is not None:
     1.7 +                    if arg.strip() == "${saved_entry}":
     1.8 +                        arg = "0"
     1.9                      setattr(self, self.commands[com], arg.strip())
    1.10                  else:
    1.11                      logging.info("Ignored directive %s" %(com,))