From 135f4cdceab28ba804bfd0f9d4336ac3568710c0 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 9 Apr 2019 11:26:17 -0400 Subject: [PATCH] Use Sys::Hostname instead of Net::Domain --- xCAT-server/lib/xcat/plugins/openbmc.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index b7969c51c..8d8e9da51 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -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 {