aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-07-15 18:12:55 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-07-15 18:12:55 +0100
commitcf5cc0aa312a163acbccdaa525cf332d2bc7f363 (patch)
tree7f20b530e73659547ea1ca0bde56f0fbd0df5deb /tools/pygrub
parent22771413fbf227c5c48f312203c7ee53d2bc724b (diff)
downloadxen-cf5cc0aa312a163acbccdaa525cf332d2bc7f363.tar.gz
xen-cf5cc0aa312a163acbccdaa525cf332d2bc7f363.tar.bz2
xen-cf5cc0aa312a163acbccdaa525cf332d2bc7f363.zip
pygrub: prefer Grub2 to Grub1
If a VM image has grub2 installed it is likely the one we need to be using. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r--tools/pygrub/src/pygrub10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index 843118534a..52b18237cc 100644
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -385,14 +385,14 @@ class Grub:
# fallbacks
["/efi/boot/elilo.conf", "/elilo.conf",])
else:
- cfg_list = map(lambda x: (x,grub.GrubConf.GrubConfigFile),
- ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
- "/grub/menu.lst", "/grub/grub.conf"]) + \
- map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
+ cfg_list = map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
["/boot/grub/grub.cfg", "/grub/grub.cfg"]) + \
map(lambda x: (x,grub.ExtLinuxConf.ExtLinuxConfigFile),
["/boot/isolinux/isolinux.cfg",
- "/boot/extlinux.conf"])
+ "/boot/extlinux.conf"]) + \
+ map(lambda x: (x,grub.GrubConf.GrubConfigFile),
+ ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
+ "/grub/menu.lst", "/grub/grub.conf"])
if not fs:
# set the config file and parse it