2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-12 00:00:12 +00:00

dhcp.pm: moved authoritative statement inside the network stanza

This commit is contained in:
billwajda
2015-04-02 15:04:24 -04:00
committed by WangXiaoPeng
parent 05339e823e
commit a2c5a0be58

View File

@ -2041,7 +2041,14 @@ sub addnet6
$idx++;
}
unless ($dhcp6conf[$idx] =~ /\} # $iface nic_end\n/) {
return 1; #TODO: this is an error condition
$callback->(
{
error =>
["Could not add the subnet $net/$mask for nic $nic into $dhcpconffile.\nPlease verify the xCAT database matches networks defined on this system."],
errorcode => [1]
}
);
return 1;
}
}
@ -2053,6 +2060,7 @@ sub addnet6
my @netent = (
" subnet6 $net {\n",
" authoritative;\n",
" max-lease-time $dhcplease;\n",
" min-lease-time $dhcplease;\n",
" default-lease-time $dhcplease;\n",
@ -2334,6 +2342,7 @@ sub addnet
}
@netent = (
" subnet $net netmask $mask {\n",
" authoritative;\n",
" max-lease-time $dhcplease;\n",
" min-lease-time $dhcplease;\n",
" default-lease-time $dhcplease;\n"
@ -2692,7 +2701,6 @@ sub newconfig
my $passtab = xCAT::Table->new('passwd', -create => 1);
push @dhcpconf, "#xCAT generated dhcp configuration\n";
push @dhcpconf, "\n";
push @dhcpconf, "authoritative;\n";
push @dhcpconf, "option conf-file code 209 = text;\n";
push @dhcpconf, "option space isan;\n";
push @dhcpconf, "option isan-encap-opts code 43 = encapsulate isan;\n";