Changeset 13568 in genesis for tools


Ignore:
Timestamp:
Mar 18, 2016, 10:39:46 PM (9 years ago)
Author:
rick
Message:

Quirk to enable DHCP shared-network again in case an interface has aliases.

Should fix support#65

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13565 r13568  
    523523
    524524    if dhcp_type(datadump[iface_key]) != DHCP_SERVER:
    525       dhcp_out[iface_key].append("## %(autogen_ifname)s - %(comment)s\n" % datadump[iface_key])
     525      dhcp_out[ifname].append("## %(autogen_ifname)s - %(comment)s\n" % datadump[iface_key])
    526526    else:
    527527      dhcp_out['bridge0'].append("   ## %(autogen_ifname)s - %(comment)s\n" % datadump[iface_key])
     
    533533
    534534    if dhcp_type(datadump[iface_key]) != DHCP_SERVER:
    535       dhcp_out[iface_key].append(textwrap.dedent("""\
     535      dhcp_out[ifname].append(textwrap.dedent("""\
    536536        subnet %(autogen_subnet)s netmask %(autogen_netmask)s {
    537537          ### not autoritive
     
    569569    if ifname == 'bridge0':
    570570      output += ("shared-network %s {\n" % ifname) + ''.join(value)  + '}\n\n'
     571    elif len(value) > 2:
     572      output += ("shared-network %s {\n" % ifname) + indent(''.join(value), 2)  + '\n}\n\n'
    571573    else:
    572574      output += ''.join(value) + "\n\n"
Note: See TracChangeset for help on using the changeset viewer.