fix for bug 3391271: add dns forwarder into /var/named/db.cache to support dns forwarder on AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10505 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
057b05e3bf
commit
192d8e77cf
@ -877,6 +877,18 @@ sub update_namedconf {
|
||||
# Toutch the stub zone file
|
||||
system("/usr/bin/touch $ctx->{dbdir}.'/db.cache'");
|
||||
$ctx->{restartneeded}=1;
|
||||
if($ctx->{forwarders})
|
||||
{
|
||||
my $dbcachefile = $ctx->{dbdir}.'/db.cache';
|
||||
my $cmd = qq~dig @"$ctx->{forwarders}[0]" . ns >> $dbcachefile~;
|
||||
my $outref = xCAT::Utils->runcmd("$cmd", 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
my $rsp = {};
|
||||
$rsp->{data}->[0] = "Failed to run command: $cmd.\n";
|
||||
xCAT::MsgUtils->message("W", $rsp, $callback, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user