From b4fa5f0486966538f862c038d9dc0108a93018b6 Mon Sep 17 00:00:00 2001 From: bybai Date: Wed, 22 Mar 2017 03:08:33 -0400 Subject: [PATCH] fix issue 2717 makehosts -d will delete erroneously entries /etc/hosts if one node s01 another is --- xCAT-server/lib/xcat/plugins/hosts.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index 87daa39b2..bf0cd10ec 100755 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -44,7 +44,7 @@ sub delnode while ($idx <= $#hosts) { if (($ip and $hosts[$idx] =~ /^${ip}\s/) - or $hosts[$idx] =~ /^\d+\.\d+\.\d+\.\d+\s+${node}[\s\.r]/) + or $hosts[$idx] =~ /^\d+\.\d+\.\d+\.\d+\s+${node}[\s\.\r]/) { $hosts[$idx] = ""; }