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