2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Merge pull request #5479 from thilo-maurer/master

Fix broken xcat-probing for static IP on ubuntu
This commit is contained in:
Weihua Hu 2018-08-09 18:15:46 +08:00 committed by GitHub
commit a87db132b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,7 @@ sub is_static_ip {
my $output2 = `cat /etc/sysconfig/network/ifcfg-$nic 2>&1 |grep -i BOOTPROTO`;
$rst = 1 if (($output1 =~ /$ip/) && ($output2 =~ /static/i));
} elsif ($os =~ /ubuntu/) {
my $output = `cat /etc/network/interfaces 2>&1|grep -E "iface\s+$nic"`;
my $output = `cat /etc/network/interfaces 2>&1|grep -E "iface\\s+$nic"`;
$rst = 1 if ($output =~ /static/i);
}
return $rst;