Changeset 13504 in genesis


Ignore:
Timestamp:
Nov 25, 2015, 10:04:12 AM (9 years ago)
Author:
rick
Message:
  • Members of interfaces should be included into the creating of the interface.
  • Interfaces should be brought up explicitly if no IP is configured on it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13503 r13504  
    880880  output += "\n"
    881881  output += "cloned_interfaces='bridge0'\n"
    882   output += "ifconfig_bridge0='addm %s up'\n" % ' addm '.join(datadump['autogen_dhcp_interfaces'])
    883882
    884883  # Details like SSID
     
    903902        cmp=lambda x,y: cmp(1 if x == '172' else 0, 1 if y == '172' else 0)
    904903      )
    905     output += "ifconfig_%s='inet %s'\n" % (iface, addrs[0][0])
     904
     905    if iface == 'bridge0':
     906      output += "ifconfig_bridge0='addm %s %s up'\n" % (' addm '.join(datadump['autogen_dhcp_interfaces']), addrs[0][0])
     907    else:
     908      output += "ifconfig_%s='inet %s'\n" % (iface, addrs[0][0])
    906909    for idx, addr in enumerate(addrs[1:]):
    907910      output += "ifconfig_%s_alias%s='inet %s'\n" % (iface, idx, addr[0])
     911    if iface == 'bridge0':
     912      for dhcp_iface in datadump['autogen_dhcp_interfaces']:
     913        output += "ifconfig_%s='up'\n" % dhcp_iface.replace('.','_')
    908914    output += "\n"
    909915
Note: See TracChangeset for help on using the changeset viewer.