- Timestamp:
- Aug 15, 2009, 10:02:26 AM (15 years ago)
- Location:
- tools/iris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/iris/genesis.conf
r7036 r7123 19 19 $filelist[4]="txtconfig"; 20 20 $filelist[5]="authorized_keys"; 21 $filelist[5]="dnsmasq.conf"; 21 22 22 23 #Ignore this node diretories -
tools/iris/wleiden.pl
r7076 r7123 60 60 $output .= $config{$interface}; 61 61 }; 62 return($output); 63 }; 64 65 66 sub dnsmasq_conf { 67 my $output = genHeader("#"); 68 $output .= 69 "# Query all upstream dns servers by default\n" . 70 "--all-servers \n" . 71 "# DHCP server options \n" . 72 "--dhcp-authoritative \n" . 73 "--dhcp-fqdn \n" . 74 "--domain=dhcp.$nodename.$domain. \n" . 75 "\n"; 76 77 foreach my $interface (sort keys %config) { 78 if( $interface =~ /^[a-z]+[0-9]+$/i ) { 79 (my $ip, my $netmask) = split('/', $IP{$interface}); 80 my $subnet = IP::toSubnet($netmask); 81 82 $output .= 83 "## $interface $DESC{$interface}\n"; 84 85 if ( $DHCP{$interface} =~ /[0-9]+\-[0-9]+/i ) { 86 my $dhcp_part = $ip; 87 $dhcp_part =~ s/[0-9]+$//; 88 (my $dhcp_start, my $dhcp_stop) = $DHCP{$interface} =~ /([0-9]+)\-([0-9]+)/i; 89 $dhcp_start = $dhcp_part . $dhcp_start; 90 $dhcp_stop = $dhcp_part . $dhcp_stop; 91 $output .= "--dhcp-range=$interface,$dhcp_start,$dhcp_stop,$subnet,24h\n\n"; 92 } 93 else { 94 $output .= "# not autoritive \n\n"; 95 }; 96 }; 97 }; 98 62 99 return($output); 63 100 };
Note:
See TracChangeset
for help on using the changeset viewer.