WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] pygrub: run first entry in config when in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] pygrub: run first entry in config when invalid default boot option provided
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Mar 2009 08:40:28 -0700
Delivery-date: Fri, 20 Mar 2009 08:41:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1237563453 0
# Node ID 6a069ea7149b9b77003f246470ef47ed777b2b36
# Parent  1dd7b640d9534bf1dd2f6f07d6f75ab7ed2c086c
pygrub: run first entry in config when invalid default boot option provided

This behaviour matches that of real GRUB.

Signed-off-by: Michal Novotny <minovotn@xxxxxxxxxx>
---
 tools/pygrub/src/pygrub |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 1dd7b640d953 -r 6a069ea7149b tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub   Fri Mar 20 12:33:55 2009 +0000
+++ b/tools/pygrub/src/pygrub   Fri Mar 20 15:37:33 2009 +0000
@@ -530,7 +530,11 @@ def run_grub(file, entry, fs, arg):
         print "No kernel image selected!"
         sys.exit(1)
 
-    img = g.cf.images[sel]
+    try:
+        img = g.cf.images[sel]
+    except:
+        log.debug("PyGrub: Default selection is not valid, using first boot 
configuration...")
+        img = g.cf.images[0]
 
     grubcfg = { "kernel": None, "ramdisk": None, "args": None }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] pygrub: run first entry in config when invalid default boot option provided, Xen patchbot-unstable <=