From e0097dcf21d48ed34ae3be0c6308887478842ae1 Mon Sep 17 00:00:00 2001 From: Thilo Maurer Date: Wed, 8 Aug 2018 10:23:35 +0200 Subject: [PATCH] fix probing for static IP: proper escaping of backslash --- xCAT-probe/lib/perl/probe_utils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-probe/lib/perl/probe_utils.pm b/xCAT-probe/lib/perl/probe_utils.pm index f8c1b2209..4eccc626a 100644 --- a/xCAT-probe/lib/perl/probe_utils.pm +++ b/xCAT-probe/lib/perl/probe_utils.pm @@ -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;