Changeset 3782 in /cluster/svnroot


Ignore:
Timestamp:
Aug 25, 2012 2:53:11 PM (8 years ago)
Author:
skylar
Message:

make valid bccd_net.conf file (#729)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar/bccd-3.1.1/trees/usr/local/lib/site_perl/Bccd.pm

    r3781 r3782  
    20432043                print $DCONF "# This is a total hack to get DHCP to work with interface aliases\n";
    20442044                print $DCONF "subnet $BCCD_NET->{'net'} netmask $BCCD_NET->{'mask'} {\n\n";
    2045                 print $DCONF "authoritative;";
     2045                print $DCONF "authoritative;\n";
    20462046        print $DCONF "\toption subnet-mask $pubnet->{'mask'};\n";
    20472047        print $DCONF "\toption broadcast-address $pubnet->{'bcast'};\n";
     
    20602060        my $base_dhcpnic_ip = new NetAddr::IP($nic_conf->{$base_dhcpnic}->{'ipaddr'},
    20612061                                                                $nic_conf->{$base_dhcpnic}->{'mask'});
    2062 
    2063         print $DCONF "subnet ".$base_dhcpnic_ip->network()." ";
    2064         print $DCONF "$nic_conf->{$base_dhcpnic}->{'mask'} {\n";
    2065         print $DCONF "\tallow members of \"bccd-nodes\";\n";
     2062        # Just get the network address, not the mask
     2063        my $network = $base_dhcpnic_ip->network();
     2064        $network =~ s{/\d+$}{};
     2065
     2066        print $DCONF "subnet $network ";
     2067        print $DCONF "netmask $nic_conf->{$base_dhcpnic}->{'mask'} {\n";
     2068        print $DCONF "\tpool {\n";
     2069        print $DCONF "\t\tallow members of \"bccd-nodes\";\n";
     2070        print $DCONF "\t\trange 127.0.0.10 127.0.0.11;\n";
     2071        print $DCONF "\t}\n";
    20662072        print $DCONF "}\n";
    20672073   
     
    23292335        }
    23302336        close($IPT);
    2331        
     2337
    23322338      NIC_CONF:
    23332339        foreach my $nic (sort keys %{$nic_conf}) {
Note: See TracChangeset for help on using the changeset viewer.