From dfb30a46a96511a053d828c683d95d17c6332a21 Mon Sep 17 00:00:00 2001 From: ligc Date: Fri, 7 May 2010 02:44:50 +0000 Subject: [PATCH] call NetworkUtils.pm subroutines instead of Utils.pm subroutines git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6009 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DBobjUtils.pm | 3 ++- perl-xCAT/xCAT/InstUtils.pm | 3 ++- perl-xCAT/xCAT/PPCmac.pm | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index ffebe5e1e..b4c71b087 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -15,6 +15,7 @@ use xCAT::Schema; use xCAT::Table; use xCAT::Utils; use xCAT::MsgUtils; +use xCAT::NetworkUtils; use strict; # IPv6 not yet implemented - need Socket6 @@ -1844,7 +1845,7 @@ sub getNetwkInfo { # get, check, split the node IP - my $IP = xCAT::Utils->getipaddr($node); + my $IP = xCAT::NetworkUtils->getipaddr($node); chomp $IP; unless (($IP =~ /\d+\.\d+\.\d+\.\d+/) || ($IP =~ /:/)) { diff --git a/perl-xCAT/xCAT/InstUtils.pm b/perl-xCAT/xCAT/InstUtils.pm index bcd36cb3a..6139c277a 100644 --- a/perl-xCAT/xCAT/InstUtils.pm +++ b/perl-xCAT/xCAT/InstUtils.pm @@ -24,6 +24,7 @@ use Socket; use Sys::Hostname; use strict; require xCAT::Schema; +use xCAT::NetworkUtils; #require Data::Dumper; use Data::Dumper; @@ -185,7 +186,7 @@ sub is_me my ($class, $name) = @_; # convert to IP - my $nameIP = xCAT::Utils->getipaddr($name); + my $nameIP = xCAT::NetworkUtils->getipaddr($name); chomp $nameIP; # split into octets diff --git a/perl-xCAT/xCAT/PPCmac.pm b/perl-xCAT/xCAT/PPCmac.pm index 52dd773ff..1e3888428 100644 --- a/perl-xCAT/xCAT/PPCmac.pm +++ b/perl-xCAT/xCAT/PPCmac.pm @@ -5,6 +5,7 @@ use Socket; use strict; use Getopt::Long; use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR); +use xCAT::NetworkUtils; ########################################################################## @@ -96,7 +97,7 @@ sub parse_args { push @network, $_; } else { # get, check the node IP - $client_ip = xCAT::Utils->getipaddr(@$node[0]); + $client_ip = xCAT::NetworkUtils->getipaddr(@$node[0]); chomp $client_ip; if ( $client_ip ) { $opt{C} = $client_ip; @@ -118,7 +119,7 @@ sub parse_args { # Service node is returned as hostname, Convert # hostname to IP #################################### - $server_ip = xCAT::Utils->getipaddr($key); + $server_ip = xCAT::NetworkUtils->getipaddr($key); chomp $server_ip; } else { ####################################