1
0
mirror of synced 2026-05-05 07:43:42 +00:00

Determine the correct pygrub path in xm.tmpl

This commit is contained in:
Axel Beckert
2010-05-16 00:46:11 +02:00
parent 49cf467f49
commit a1d179c9eb

View File

@@ -19,7 +19,19 @@
{
if ( $pygrub )
{
$OUT .= "bootloader = '/usr/bin/pygrub'\n";
my $pygrub_bin = '';
foreach my $pygrub_path (reverse glob('/usr/lib/xen-*/bin/pygrub
/usr/lib/xen-default/bin/pygrub
/usr/*bin/pygrub')) {
if (-x $pygrub_path) {
$pygrub_bin = $pygrub_path;
last;
}
}
die "pygrub not found" unless $pygrub_bin;
$OUT .= "bootloader = '$pygrub_bin'\n";
}
}
memory = '{$memory}'