-Move bind.pm out of searchpath
-Make dns.pm potentially work git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5489 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d36029ab1b
commit
c45cad105c
@ -9,6 +9,10 @@ use strict;
|
||||
|
||||
my $callback;
|
||||
|
||||
sub handled_commands
|
||||
{
|
||||
return {"makedns" => "dns"};
|
||||
}
|
||||
sub get_reverse_zone_for_entity {
|
||||
my $ctx = shift;
|
||||
my $node = shift;
|
||||
@ -509,5 +513,46 @@ sub find_nameserver_for_dns {
|
||||
}
|
||||
}
|
||||
sub sendmsg {
|
||||
print Dumper(@_);
|
||||
# my $callback = $output_handler;
|
||||
my $text = shift;
|
||||
my $node = shift;
|
||||
my $descr;
|
||||
my $rc;
|
||||
if (ref $text eq 'HASH') {
|
||||
die "not right now";
|
||||
} elsif (ref $text eq 'ARRAY') {
|
||||
$rc = $text->[0];
|
||||
$text = $text->[1];
|
||||
}
|
||||
if ($text =~ /:/) {
|
||||
($descr,$text) = split /:/,$text,2;
|
||||
}
|
||||
$text =~ s/^ *//;
|
||||
$text =~ s/ *$//;
|
||||
my $msg;
|
||||
my $curptr;
|
||||
if ($node) {
|
||||
$msg->{node}=[{name => [$node]}];
|
||||
$curptr=$msg->{node}->[0];
|
||||
} else {
|
||||
$msg = {};
|
||||
$curptr = $msg;
|
||||
}
|
||||
if ($rc) {
|
||||
$curptr->{errorcode}=[$rc];
|
||||
$curptr->{error}=[$text];
|
||||
$curptr=$curptr->{error}->[0];
|
||||
if (defined $node) {
|
||||
$allerrornodes{$node}=1;
|
||||
}
|
||||
} else {
|
||||
$curptr->{data}=[{contents=>[$text]}];
|
||||
$curptr=$curptr->{data}->[0];
|
||||
if ($descr) { $curptr->{desc}=[$descr]; }
|
||||
}
|
||||
# print $outfd freeze([$msg]);
|
||||
# print $outfd "\nENDOFFREEZE6sK4ci\n";
|
||||
# yield;
|
||||
# waitforack($outfd);
|
||||
$callback->($msg);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user