$$lleaf_ref= $rdest;
$$lleaf_ref =~ s,.*/,,;
}
- $$lleaf_ref= "$ho->{Name}--$$lleaf_ref";
+ $$lleaf_ref= hostnamepath($ho)."--$$lleaf_ref";
}
sub tpfcs_core {
my ($ho, $bootfile) = @_;
my $f= host_pxefile($ho);
file_link_contents("$ho->{Tftp}{Path}$ho->{Tftp}{PxeDir}$f", $bootfile,
- "$ho->{Name}-pxelinux.cfg");
+ hostnamepath($ho)."-pxelinux.cfg");
}
# Systems using BIOS are configured to use pxelinux
my $f = "grub.cfg-$ho->{Ether}";
my $grub= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{GrubBase}.'/'.
$c{TftpGrubVersion}."/pxegrub-$r{arch}.efi";
- my $pxe=$ho->{Tftp}{Path}.'/'.$ho->{Name}.'/pxe.img';
+ my $pxe=$ho->{Tftp}{Path}.'/'.hostnamepath($ho).'/pxe.img';
logm("Copy $grub => $pxe");
copy($grub, $pxe) or die "Copy $grub to $pxe failed: $!";
logm("grub_efi bootcfg into $f");
file_link_contents("$ho->{Tftp}{Path}$ho->{Tftp}{TmpDir}$f",
- $bootfile, "$ho->{Name}-pxegrub.cfg");
+ $bootfile, hostnamepath($ho)."-pxegrub.cfg");
}
# UEFI systems PXE boot using grub.efi
my $cfg = $gho->{CfgPath};
my $lcfg = $cfg;
$lcfg =~ s,/,-,g;
- $lcfg = "$ho->{Name}--$lcfg";
+ $lcfg = hostnamepath($ho)."--$lcfg";
target_cmd_root($ho, "virsh domxml-from-native xen-xl $cfg > $cfg.xml", 30);
target_getfile_root($ho,60,"$cfg.xml", "$stash/$lcfg");
target_cmd_root($ho, "virsh create --file $cfg.xml", 100);
$kernel = "/$d_i/linux" unless $kernel;
- my $initrd_overlay= "tmp/t.$ho->{Name}.initrd";
+ my $initrd_overlay= "tmp/t.".hostnamepath($ho).".initrd";
system qw(rm -rf --),"$initrd_overlay.d";
mkdir "$initrd_overlay.d" or die "$initrd_overlay.d: $!";
push @initrds, "$initrd_overlay.cpio.gz";
logm("using initrds: @initrds");
- my $initrd= "$ho->{Tftp}{TmpDir}$ho->{Name}--initrd.gz";
+ my $initrd= "$ho->{Tftp}{TmpDir}".hostnamepath($ho)."--initrd.gz";
system_checked("cat -- @initrds >$ho->{Tftp}{Path}$initrd");
push @dicmdline, "domain=$c{TestHostDomain}";