We are going to want to have multiple different guests in the same
job. Don't use the same locations for all of their fs images.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
my @images;
- my $jobdir = target_jobdir($ho);
+ my $fsimagesdir = target_jobdir($ho)."/$gn-images";
my $cfgfile = "$gn.cfg";
my $cfgpath = "/etc/xen/$cfgfile";
if ($in eq 'disk') {
s{\b img/(\w+.ffs) \b}{
push @images, $1;
- "$jobdir/$1";
+ "$fsimagesdir/$1";
}xeg;
}
store_runvar("$gho->{Guest}_cfgpath", $cfgpath);
- target_cmd($ho, "cp $rkdist/img/$_ $jobdir/$_", 200)
- foreach @images;
+ target_cmd($ho, <<END.(join "\n", map { <<END; } @images), 200);
+ mkdir -p $fsimagesdir
+END
+ cp $cfg_rkdist/img/$_ $fsimagesdir/$_
+END
}
prep();