ipv6 fix, replace the Socket library calls with NetworkUtils subroutines
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6041 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
7fcf1a3a7f
commit
17bdca227c
@ -30,6 +30,7 @@ BEGIN
|
||||
use lib "$::XCATROOT/lib/perl";
|
||||
use DBI;
|
||||
use xCAT::Utils;
|
||||
use xCAT::NetworkUtils;
|
||||
use Getopt::Long;
|
||||
use xCAT::MsgUtils;
|
||||
use xCAT::Table;
|
||||
@ -267,10 +268,11 @@ if ($::INIT)
|
||||
chomp $hname;
|
||||
|
||||
}
|
||||
my ($name, $aliases, $addrtype, $length, @addrs) = gethostbyname($hname);
|
||||
if ($? == 0)
|
||||
#my ($name, $aliases, $addrtype, $length, @addrs) = gethostbyname($hname);
|
||||
my $ipaddr = xCAT::NetworkUtils->getipaddr($hname);
|
||||
if ($ipaddr)
|
||||
{
|
||||
$::MN = inet_ntoa($addrs[0]);
|
||||
$::MN = $ipaddr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user