@@ -554,7 +554,11 @@ END
foreach my $kp (keys %{ $ho->{Flags} }) {
$kp =~ s/need-kernel-deb-// or next;
- my $d_i= $c{TftpPath}.'/'.$c{TftpDiBase}.'/'.$r{arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite};
+ my $tftppath = get_host_property($ho, "TftpPath", $c{TftpPath});
+ my $tftpdibase = get_host_property($ho, "TftpDiBase", $c{TftpDiBase});
+ my $tftpdiversion = get_host_property($ho, "TftpDiVersion", $c{TftpDiVersion});
+
+ my $d_i= $tftppath.'/'.$tftpdibase.'/'.$r{arch}.'/'.$tftpdiversion.'-'.$ho->{Suite};
my $kurl = create_webfile($ho, "kernel", sub {
copy("$d_i/$kp.deb", $_[0]);
@@ -1839,8 +1839,11 @@ sub host_pxefile ($) {
sub setup_pxeboot ($$) {
my ($ho, $bootfile) = @_;
+ my $p= get_host_property($ho, "TftpPath", $c{TftpPath});
+ my $d= get_host_property($ho, "TftpPxeDir", $c{TftpPxeDir});
my $f= host_pxefile($ho);
- file_link_contents("$c{TftpPath}$c{TftpPxeDir}$f", $bootfile);
+
+ file_link_contents("$p$d$f", $bootfile);
}
sub setup_pxeboot_local ($) {
@@ -122,19 +122,23 @@ END
sub setup_pxeboot_firstboot($) {
my ($ps_url) = @_;
- my $d_i= $c{TftpDiBase}.'/'.$r{arch}.'/'.$c{TftpDiVersion}.'-'.$ho->{Suite};
+ my $tftppath = get_host_property($ho, "TftpPath", $c{TftpPath});
+ my $tftpdibase = get_host_property($ho, "TftpDiBase", $c{TftpDiBase});
+ my $tftpdiversion = get_host_property($ho, "TftpDiVersion", $c{TftpDiVersion});
+
+ my $d_i= $tftpdibase.'/'.$r{arch}.'/'.$tftpdiversion.'-'.$ho->{Suite};
my @installcmdline= qw(vga=normal);
push @installcmdline, di_installcmdline_core($ho, $ps_url, %xopts);
my $src_initrd= "$d_i/initrd.gz";
- my @initrds= "$c{TftpPath}/$src_initrd";
+ my @initrds= "$tftppath/$src_initrd";
my $kernel;
foreach my $fp (keys %{ $ho->{Flags} }) {
$fp =~ s/^need-firmware-deb-// or next;
- my $cpio= "$c{TftpPath}/$d_i/$fp.cpio.gz";
+ my $cpio= "$tftppath/$d_i/$fp.cpio.gz";
if (stat $cpio) {
logm("using firmware from: $cpio");
push @initrds, $cpio;
@@ -147,7 +151,7 @@ sub setup_pxeboot_firstboot($) {
foreach my $kp (keys %{ $ho->{Flags} }) {
$kp =~ s/need-kernel-deb-// or next;
- my $kern= "$c{TftpPath}/$d_i/linux.$kp";
+ my $kern= "$tftppath/$d_i/linux.$kp";
if (stat $kern) {
logm("using kernel from: $kern");
$kernel = "/$d_i/linux.$kp";
@@ -157,7 +161,7 @@ sub setup_pxeboot_firstboot($) {
die "$kp $kern $!";
}
- my $cpio= "$c{TftpPath}/$d_i/$kp.cpio.gz";
+ my $cpio= "$tftppath/$d_i/$kp.cpio.gz";
if (stat $cpio) {
logm("using kernel modules from: $cpio");
push @initrds, $cpio;
@@ -195,7 +199,7 @@ END
logm("using initrds: @initrds");
my $initrd= "$c{TftpTmpDir}$ho->{Name}--initrd.gz";
- system_checked("cat -- @initrds >$c{TftpPath}$initrd");
+ system_checked("cat -- @initrds >$tftppath$initrd");
push @installcmdline, ("initrd=/$initrd",
"domain=$c{TestHostDomain}",
I run osstest against machines which are in both the XenServer and XenClient administrative domains, and hence which have different TFTP servers, accessible locally via different NFS mounted paths. Make it possible to specify various bits of TFTP path via ~/.xen-osstest/config Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- Osstest/Debian.pm | 6 +++++- Osstest/TestSupport.pm | 5 ++++- ts-host-install | 16 ++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-)