support ddns as the default dnshandler.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9576 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
19060ab5b1
commit
22219b3dad
@ -716,37 +716,6 @@ 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->{arg}->[1] = "-s";
|
||||
$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
|
||||
|
@ -189,7 +189,6 @@ sub process_request {
|
||||
my $hadargs=0;
|
||||
my $allnodes;
|
||||
my $zapfiles;
|
||||
my $svcnode;
|
||||
my $help;
|
||||
my $deletemode=0;
|
||||
if ($request->{arg}) {
|
||||
@ -202,7 +201,6 @@ sub process_request {
|
||||
'a|all' => \$allnodes,
|
||||
'n|new' => \$zapfiles,
|
||||
'd|delete' => \$deletemode,
|
||||
's|svcnode' => \$svcnode, # internal flag to indicate makedns is run on the servicenode(e.g. from AAsn.pm).
|
||||
'h|help' => \$help,
|
||||
)) {
|
||||
#xCAT::SvrUtils::sendmsg([1,"TODO: makedns Usage message"], $callback);
|
||||
@ -327,25 +325,10 @@ sub process_request {
|
||||
$ctx->{privkey} = $pent->{password};
|
||||
} #do not warn/error here yet, if we can't generate or extract, we'll know later
|
||||
|
||||
# if $svcnode is set, then makedns is run on the servicenode
|
||||
# we set the forwarder to site.master to always forward unknown requests to the MN
|
||||
if ($svcnode)
|
||||
{
|
||||
# use site.master instead of site.forwarders
|
||||
$stab = $sitetab->getAttribs({key=>'master'},['value']);
|
||||
if ($stab and $stab->{value}) {
|
||||
my @forwarders;
|
||||
push @forwarders, $stab->{value};
|
||||
$ctx->{forwarders} = \@forwarders;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stab = $sitetab->getAttribs({key=>'forwarders'},['value']);
|
||||
if ($stab and $stab->{value}) {
|
||||
my @forwarders = split /[ ,]/,$stab->{value};
|
||||
$ctx->{forwarders}=\@forwarders;
|
||||
}
|
||||
$stab = $sitetab->getAttribs({key=>'forwarders'},['value']);
|
||||
if ($stab and $stab->{value}) {
|
||||
my @forwarders = split /[ ,]/,$stab->{value};
|
||||
$ctx->{forwarders}=\@forwarders;
|
||||
}
|
||||
$ctx->{zonestotouch}->{$ctx->{domain}}=1;
|
||||
foreach (@nodes) {
|
||||
|
Loading…
Reference in New Issue
Block a user