[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] pyrgrub: cope with configurations with set default="${saved_entry}" line



# HG changeset patch
# User Michael Young <m.a.young@xxxxxxxxxxxx>
# 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@xxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 152049468175 -r 979bc34d0ad0 tools/pygrub/src/GrubConf.py
--- a/tools/pygrub/src/GrubConf.py      Tue Oct 25 19:20:06 2011 +0100
+++ b/tools/pygrub/src/GrubConf.py      Tue Oct 25 19:21:05 2011 +0100
@@ -425,6 +425,8 @@
                 
             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,))

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.