2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Use Sys::Hostname instead of Net::Domain

This commit is contained in:
Mark Gurevich 2019-04-09 11:26:17 -04:00
parent 932bf55944
commit 135f4cdcea

View File

@ -19,7 +19,7 @@ use JSON;
use HTTP::Async;
use HTTP::Cookies;
use LWP::UserAgent;
use Net::Domain qw(hostname);
use Sys::Hostname;
use File::Basename;
use File::Spec;
use File::Copy qw/copy cp mv move/;
@ -4197,8 +4197,8 @@ sub dump_download_process {
return 1;
}
if ($h->{message} eq $::RESPONSE_OK) {
my $host_name = hostname();
xCAT::MsgUtils->message("I", { data => ["$node: Downloading dump $dump_id to $host_name:$file_name"] }, $callback);
my @host_name = split(/\./, hostname());
xCAT::MsgUtils->message("I", { data => ["$node: Downloading dump $dump_id to $host_name[0]:$file_name"] }, $callback);
my $curl_dwld_result = `$curl_dwld_cmd -s`;
if (!$curl_dwld_result) {
if ($xcatdebugmode) {
@ -4217,7 +4217,7 @@ sub dump_download_process {
# Remove downloaded file, nothing useful inside of it
unlink $file_name;
} else {
xCAT::MsgUtils->message("I", { data => ["$node: Downloaded dump $dump_id to $host_name:$file_name"] }, $callback) if ($::VERBOSE);
xCAT::MsgUtils->message("I", { data => ["$node: Downloaded dump $dump_id to $host_name[0]:$file_name"] }, $callback) if ($::VERBOSE);
}
}
else {