Changeset 252 for trunk/dhcp


Ignore:
Timestamp:
Dec 11, 2007, 2:23:21 AM (17 years ago)
Author:
ecprice
Message:

Allow fully qualified domains in the NICs table to override the
name.servers.csail.mit.edu domains.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dhcp/dhcpserver.py

    r230 r252  
    110110        if ip is None:  #Deactivated?
    111111            return False
    112         hostname = nic.machine.name
    113         if hostname is not None:
    114             hostname += ".servers.csail.mit.edu"
     112        if nic.hostname and '.' in nic.hostname:
     113            hostname = nic.hostname
     114        elif nic.machine.name:
     115            hostname = nic.machine.name + '.servers.csail.mit.edu'
     116        else:
     117            hostname = None
    115118        if ip is not None:
    116119            ip = ipv4(ip)
Note: See TracChangeset for help on using the changeset viewer.