From 7b2ae3ecd7b0595939be4732d3daf69e53aaf467 Mon Sep 17 00:00:00 2001 From: cxhong Date: Mon, 20 Apr 2020 12:47:50 -0400 Subject: [PATCH] Support hostname from nicalias regular expression --- xCAT-server/lib/xcat/plugins/hosts.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index 1eb234ab6..d84b5d155 100755 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -790,6 +790,11 @@ sub donics next; } + # for example: nicaliases.ib0=|maestro-(\d+)$|m($1)-ib0| + if ($aliases =~ /^\|\S*\|$/) { + $aliases = xCAT::Table::transRegexAttrs($node, $aliases); + } + if ($aliases =~ /\|/) { my @names = split(/\|/, $aliases); my $index = 0;