From 7eb6cdac76f9fd6c3b7c7fb35925ab4b588a1329 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 18 Aug 2011 17:38:53 +0000 Subject: [PATCH] Allow domain in /etc/resolv.conf for AIX git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10318 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ddns.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ddns.pm b/xCAT-server/lib/xcat/plugins/ddns.pm index b1f217189..1315ad2a9 100644 --- a/xCAT-server/lib/xcat/plugins/ddns.pm +++ b/xCAT-server/lib/xcat/plugins/ddns.pm @@ -266,7 +266,7 @@ sub process_request { xCAT::SvrUtils::sendmsg([0,"Warning:The management node is not defined as a nameserver in /etc/resolv.conf. Add \"nameserver $nameserver\" to /etc/resolv.conf and run makedns again."], $callback); } - # check if search site.domain in /etc/resolv.conf + # chk if search site.domain or domain site.domain on AIX in /etc/resolv.conf $found=0; my $domain=$ctx->{domain}; my $cmd="grep $domain $resolv"; @@ -280,10 +280,17 @@ sub process_request { $found=1; last; } + # if AIX could be a domain line + if (xCAT::Utils->isAIX()) { + if ($line =~ /^domain/) { + $found=1; + last; + } + } } } if ($found == 0) { # no search site.domain found - xCAT::SvrUtils::sendmsg([0,"Warning:The domain is not defined in a search path in /etc/resolv.conf. Add \"search $domain\" to /etc/resolv.conf and run makedns again."], $callback); + xCAT::SvrUtils::sendmsg([0,"Warning:The domain is not defined in a search path or domain path for AIX (in /etc/resolv.conf. Add \"search $domain\" to /etc/resolv.conf and run makedns again."], $callback); } my $networkstab = xCAT::Table->new('networks',-create=>0);