Fix bug 3425775: lsslp plugin bug /opt/xcat/lib/perl/xCAT/NetworkUtils.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10840 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
710207375c
commit
17e2c2a0d3
@ -566,16 +566,17 @@ sub get_nic_ip
|
||||
# en1: ...
|
||||
#
|
||||
##############################################################
|
||||
my @adapter = split /\w+\d+:\s+flags=/, $result;
|
||||
my @adapter = split /(\w+\d+):\s+flags=/, $result;
|
||||
foreach ( @adapter ) {
|
||||
if ($_ =~ /^(en\d)/) {
|
||||
$nic = $1;
|
||||
next;
|
||||
}
|
||||
if ( !($_ =~ /LOOPBACK/ ) and
|
||||
$_ =~ /UP(,|>)/ and
|
||||
$_ =~ /$mode/ ) {
|
||||
my @ip = split /\n/;
|
||||
for my $ent ( @ip ) {
|
||||
if ($ent =~ /^(en\d)\s+/) {
|
||||
$nic = $1;
|
||||
}
|
||||
if ( $ent =~ /^\s*inet\s+(\d+\.\d+\.\d+\.\d+)/ ) {
|
||||
$iphash{$nic} = $1;
|
||||
next;
|
||||
|
Loading…
Reference in New Issue
Block a user