diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index ed8314874..75e59ef3c 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -2033,11 +2033,11 @@ sub mknetboot { foreach (@reqmods) { $mods{$_} = 1; } + my $shortprofname = $profile; + $shortprofname =~ s/\/\z//; + $shortprofname =~ s/.*\///; unless($donetftp{$osver,$arch}) { my $srcdir = "$installroot/$osver/$arch"; - my $shortprofname = $profile; - $shortprofname =~ s/\/\z//; - $shortprofname =~ s/.*\///; my $dest = "$tftpdir/xcat/netboot/$osver/$arch/$shortprofname"; cpNetbootImages($osver,$srcdir,$dest,$custprofpath,\%mods); makecustomizedmod($osver,$dest);