From 7d0caba274bf35de2560d65fae907df855639f2c Mon Sep 17 00:00:00 2001 From: huweihua Date: Thu, 11 Oct 2018 04:48:54 -0400 Subject: [PATCH] enhance xcatmn for issue 4606 --- xCAT-probe/subcmds/xcatmn | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xCAT-probe/subcmds/xcatmn b/xCAT-probe/subcmds/xcatmn index 25fbcfe08..1bb84e807 100755 --- a/xCAT-probe/subcmds/xcatmn +++ b/xCAT-probe/subcmds/xcatmn @@ -388,10 +388,17 @@ sub check_site_table { $rst = 1; } } else { - if (($attr eq "master") and (!probe_utils->is_ip_addr("$value"))) { - push @$error_ref, "The value of 'master' in 'site' table isn't an IP addres"; - $rst = 1; + if (($attr eq "master") and (!xCAT::NetworkUtils->isIpaddr("$value"))) { + my $masterip = xCAT::NetworkUtils->getipaddr("$value"); + if (! defined $masterip){ + push @$error_ref, "The value of 'master' in 'site' table isn't an IP addres and can not be resolved to a IP addres"; + $rst = 1; + }else{ + probe_utils->send_msg("$output", "i", "The value of 'master' in 'site' table is $value, can be resolve to $masterip") if($verbose); + $value = $masterip; + } } + $sitetable_ref->{$attr} = $value; } }