2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-14 02:10:23 +00:00

Fix issue 3825, if BOOTPROTO is none consider it as static IP in xcatprobe

This commit is contained in:
XuWei
2017-08-31 22:58:21 -04:00
parent 50039719b0
commit e96a68d00a

View File

@ -182,7 +182,7 @@ sub is_static_ip {
if ($os =~ /redhat/) {
my $output1 = `cat /etc/sysconfig/network-scripts/ifcfg-$nic 2>&1 |grep -i IPADDR`;
my $output2 = `cat /etc/sysconfig/network-scripts/ifcfg-$nic 2>&1 |grep -i BOOTPROTO`;
$rst = 1 if (($output1 =~ /$ip/) && ($output2 =~ /static/i));
$rst = 1 if (($output1 =~ /$ip/) && ($output2 =~ /static|none/i));
} elsif ($os =~ /sles/) {
my $output1 = `cat /etc/sysconfig/network/ifcfg-$nic 2>&1 |grep -i IPADDR`;
my $output2 = `cat /etc/sysconfig/network/ifcfg-$nic 2>&1 |grep -i BOOTPROTO`;