From 74aeca03de91f654dda17275dd6d5db25e518978 Mon Sep 17 00:00:00 2001 From: sjing Date: Tue, 10 May 2011 08:13:58 +0000 Subject: [PATCH] support keyword in site/networks table. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9533 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/AAsn.pm | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index ae2b4a4fd..3e8a6197e 100644 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -716,6 +716,36 @@ sub setup_FTP #----------------------------------------------------------------------------- sub setup_DNS +{ + my $rc = 0; + + # run makedns + my $XCATROOT = "/opt/xcat"; # default + + if ($ENV{'XCATROOT'}) + { + $XCATROOT = $ENV{'XCATROOT'}; + } + my $cmdref; + $cmdref->{command}->[0] = "makedns"; + $cmdref->{arg}->[0] = "-n"; + $cmdref->{cwd}->[0] = "/opt/xcat/sbin"; + + no strict "refs"; + my $modname = "ddns"; + ${"xCAT_plugin::" . $modname . "::"}{process_request} + ->($cmdref, \&xCAT::Client::handle_response); + + my $rc = xCAT::Utils->startService("named"); + if ($rc != 0) + { + return 1; + } + + return $rc; +} + +if(0) { my $XCATROOT = "/opt/xcat"; # default