Changeset 328 for trunk/system


Ignore:
Timestamp:
Dec 18, 2011, 9:52:16 PM (13 years ago)
Author:
chronos
Message:
  • Upraveno: Generátor DNS nyní generuje opět IP adresy pro zdechovnet.czf pro CZFree view DNS serveru.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/dns.php

    r313 r328  
    192192}
    193193
    194 /*
     194
    195195// === CZFree network DNS server ===
    196 $BaseDomain = 'zdechov.zlin.czf';
     196$BaseDomain = 'zdechovnet.czf';
    197197$CZFreeDNS = array(
    198198  'Domain' => $BaseDomain,
     
    210210  'Host' => array(),
    211211  'Alias' => array(),
    212   'Network' => array('10.144.200'),
     212  'Network' => array('10.145.64', '10.145.65', '10.145.66', '10.145.67', '10.145.68', '10.145.69', '10.145.70', '10.145.71'),
    213213);
    214214
    215215// Hosts
    216 $DbResult = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.CZFreeIP != ""');
    217 while($Interface = $DbResult->fetch_assoc())
    218 {
    219   $Name = $Interface['DeviceName'];
    220   if($Interface['Name'] != '') $Name .= '-'.$Interface['Name'];
    221   $CZFreeDNS['Host'][] = array('Name' => $Name, 'Address' => $Interface['CZFreeIP']);
     216$DbResult = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP != ""');
     217while($Interface = $DbResult->fetch_assoc())
     218{
     219  $Name = $Interface['DeviceName'];
     220  if($Interface['Name'] != '') $Name .= '-'.$Interface['Name'];
     221  $CZFreeDNS['Host'][] = array('Name' => $Name, 'Address' => $Interface['LocalIP']);
    222222}
    223223
     
    247247  'Host' => array(),
    248248  'Alias' => array(),
    249   'Network' => array('10.144.200'),
     249  'Network' => array('10.145.64', '10.145.65', '10.145.66', '10.145.67', '10.145.68', '10.145.69', '10.145.70', '10.145.71'),
    250250);
    251251
    252252// Hosts
    253 $DbResult = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.CZFreeIP != ""');
    254 while($Interface = $DbResult->fetch_assoc())
    255 {
    256   $Name = $Interface['DeviceName'];
    257   if($Interface['Name'] != '') $Name .= '-'.$Interface['Name'];
    258   $CZFreeLocalDNS['Host'][] = array('Name' => $Name.'-czfree', 'Address' => $Interface['CZFreeIP']);
     253$DbResult = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE NetworkInterface.LocalIP != ""');
     254while($Interface = $DbResult->fetch_assoc())
     255{
     256  $Name = $Interface['DeviceName'];
     257  if($Interface['Name'] != '') $Name .= '-'.$Interface['Name'];
     258//  $CZFreeLocalDNS['Host'][] = array('Name' => $Name.'-czfree', 'Address' => $Interface['LocalIP']);
    259259  $CZFreeLocalDNS['Host'][] = array('Name' => $Name, 'Address' => $Interface['LocalIP']);
    260260}
     
    270270GenerateDNS($CZFreeDNS);
    271271GenerateDNS($CZFreeLocalDNS);
    272 */
     272
    273273
    274274GenerateDNS($LocalDNS);
Note: See TracChangeset for help on using the changeset viewer.