make the default value of networks.nameservers empty.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9591 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
5bc54fc468
commit
bfa93c73f0
@ -834,6 +834,8 @@ sub add_or_delete_records {
|
||||
if ($numreqs != 300) { #either no entries at all to begin with or a perfect multiple of 300
|
||||
$update->sign_tsig("xcat_key",$ctx->{privkey});
|
||||
my $reply = $resolver->send($update);
|
||||
# sometimes resolver does not work if the update zone request sent so quick
|
||||
sleep 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1528,15 +1528,7 @@ sub addnet
|
||||
}
|
||||
if ($ent and $ent->{nameservers})
|
||||
{
|
||||
# convert <xcatmaster> to nameserver IP
|
||||
if ($ent->{nameservers} eq '<xcatmaster>')
|
||||
{
|
||||
$nameservers = xCAT::InstUtils->convert_xcatmaster();
|
||||
}
|
||||
else
|
||||
{
|
||||
$nameservers = $ent->{nameservers};
|
||||
}
|
||||
$nameservers = $ent->{nameservers};
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -365,28 +365,7 @@ sub donets
|
||||
# For Linux systems
|
||||
my @ip6table = split /\n/,`/sbin/ip -6 route`;
|
||||
my @rtable = split /\n/, `/bin/netstat -rn`;
|
||||
open($rconf, "/etc/resolv.conf");
|
||||
my @nameservers;
|
||||
if ($rconf)
|
||||
{
|
||||
my @rcont;
|
||||
while (<$rconf>)
|
||||
{
|
||||
push @rcont, $_;
|
||||
}
|
||||
close($rconf);
|
||||
foreach (grep /nameserver/, @rcont)
|
||||
{
|
||||
my $line = $_;
|
||||
my @pair;
|
||||
$line =~ s/#.*//;
|
||||
$line =~ s/^\s*//;
|
||||
@pair = split(/\s+/, $line);
|
||||
if ($pair[0] eq 'nameserver' && $pair[1] ne '') {
|
||||
push @nameservers, $pair[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
splice @rtable, 0, 2;
|
||||
|
||||
my %netgw = ();
|
||||
@ -539,26 +518,7 @@ sub donets
|
||||
$nettab->setAttribs({'net' => $net, 'mask' => $mask}, {'netname' => $netname, 'mgtifname' => $mgtifname, 'gateway' => $gw});
|
||||
}
|
||||
}
|
||||
|
||||
my $tent = $nettab->getAttribs({'net' => $net, 'mask' => $mask}, 'nameservers');
|
||||
|
||||
# convert <xcatmaster> to nameserver IP
|
||||
if ($tent->{nameservers} eq '<xcatmaster>')
|
||||
{
|
||||
$tent->{nameservers} = xCAT::InstUtils->convert_xcatmaster();
|
||||
}
|
||||
|
||||
unless ($tent and $tent->{nameservers})
|
||||
{
|
||||
my $text = join ',', @nameservers;
|
||||
if ($::DISPLAY) {
|
||||
push @{$rsp->{data}}, " nameservers=$text";
|
||||
} else {
|
||||
if (!$foundmatch) {
|
||||
$nettab->setAttribs({'net' => $net, 'mask' => $mask}, {nameservers => $text});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unless ($tent and $tent->{tftpserver})
|
||||
{
|
||||
my $netdev = $ent[7];
|
||||
|
Loading…
Reference in New Issue
Block a user