Changeset 13132


Ignore:
Timestamp:
07/11/11 12:13:34 (13 years ago)
Author:
ramonb
Message:

templates/lisa/dhcpd.cmt:

  • skip interfaces without mac address
  • closes #3352
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt/templates/lisa/dhcpd.cmt

    r12409 r13132  
    208208    {% noblanklines %}
    209209    {% for iface in ifaces_cua %}
    210     host {{iface.fqdn}} {
    211         hardware ethernet {{iface.hwaddress}};
    212         fixed-address {{iface.ip}};
    213         option host-name "{{iface.fqdn}}";
    214     }
     210    {% if iface.hwaddress != None %}
     211    host {{iface.fqdn}} {
     212        hardware ethernet {{iface.hwaddress}};
     213        fixed-address {{iface.ip}};
     214        option host-name "{{iface.fqdn}}";
     215    }
     216    {% endif %}
    215217    {% endfor %}
    216218    {% endnoblanklines %}
     
    224226    {% noblanklines %}
    225227    {% for iface in ifaces_lisa_switches %}
     228    {% if iface.hwaddress != None %}
    226229    host {{iface.fqdn}} {
    227230        filename "";
     
    230233        option host-name "{{iface.fqdn}}";
    231234    }
     235    {% endif %}
    232236    {% endfor %}
    233237    {% endnoblanklines %}
     
    241245    {% noblanklines %}
    242246    {% for iface in ifaces_lisa_admin %}
     247    {% if iface.hwaddress != None %}
    243248        {% if 'externe service' not in iface.host.roles %}
    244249    host {{iface.fqdn}} {
     
    248253    }
    249254        {% endif %}
     255    {% endif %}
    250256    {% endfor %}
    251257    {% endnoblanklines %}
     
    258264    {% noblanklines %}
    259265    {% for iface in ifaces_lisa_admin %}
     266    {% if iface.hwaddress != None %}
    260267        {% if 'externe service' in iface.host.roles %}
    261268    host {{iface.fqdn}} {
     
    265272    }
    266273        {% endif %}
     274    {% endif %}
    267275    {% endfor %}
    268276    {% endnoblanklines %}
     
    274282    {% noblanklines %}
    275283    {% for iface in ifaces_lisa_consoles %}
    276     host {{iface.fqdn}} {
    277         hardware ethernet {{iface.hwaddress}};
    278         fixed-address {{iface.ip}};
    279         option host-name "{{iface.fqdn}}";
    280     }
     284    {% if iface.hwaddress != None %}
     285    host {{iface.fqdn}} {
     286        hardware ethernet {{iface.hwaddress}};
     287        fixed-address {{iface.ip}};
     288        option host-name "{{iface.fqdn}}";
     289    }
     290    {% endif %}
    281291    {% endfor %}
    282292    {% endnoblanklines %}
     
    288298    {% noblanklines %}
    289299    {% for iface in ifaces_icua %}
     300    {% if iface.hwaddress != None %}
    290301    host {{iface.fqdn}} {
    291302        filename "";
     
    294305        option host-name "{{iface.fqdn}}";
    295306    }
     307    {% endif %}
    296308    {% endfor %}
    297309    {% endnoblanklines %}
Note: See TracChangeset for help on using the changeset viewer.