-Prevent ddns induced by PXE (still won't help floating Windows<->Linux multiboot, that requires fixed-address for ipv4)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6190 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-05-21 00:54:05 +00:00
parent 1e5fb14b5f
commit 91c764484d

View File

@ -1048,6 +1048,12 @@ sub addnet
{
push @netent, " option domain-name-servers $nameservers;\n";
}
push @netent, "zone $domain. {\n";
my $ddnserver = $nameservers;
$ddnsserver =~ s/,.*//;
push @netent, "$domain. {\n";
push @netent, " primary $ddnserver; key xcat_key; \n";
push @netent, " }\n";
my $tmpmaskn = unpack("N", inet_aton($mask));
my $maskbits = 32;
while (not ($tmpmaskn & 1)) {
@ -1230,6 +1236,7 @@ sub newconfig
push @dhcpconf, "omapi-port 7911;\n"; #Enable omapi...
push @dhcpconf, "key xcat_key {\n";
push @dhcpconf, " algorithm hmac-md5;\n";
push @dhcpconf, ('class "pxe" {'."\n"," match if substring (option vendor-class-identefier, 0, 9) = \"PXEclient\";\n"," ddns-updates off;\n"," max-lease-time 600;\n");
(my $passent) =
$passtab->getAttribs({key => 'omapi', username => 'xcat_key'}, 'password');
my $secret = encode_base64(genpassword(32)); #Random from set of 62^32
@ -1250,12 +1257,6 @@ sub newconfig
push @dhcpconf, " secret \"" . $secret . "\";\n";
push @dhcpconf, "};\n";
push @dhcpconf, "omapi-key xcat_key;\n";
push @dhcpconf, "zone $domain. {\n";
my $ddnserver = $sitedomainservers;
$ddnsserver =~ s/,.*//;
push @dhcpconf, "$domain. {\n";
push @dhcpconf, " primary $ddnserver; key xcat_key; \n";
push @dhcpconf, " }\n";
}
sub newconfig_aix