Changeset 14054 in genesis for tools/gformat.py


Ignore:
Timestamp:
Feb 20, 2018, 7:00:50 PM (7 years ago)
Author:
rick
Message:

Fix dhcpd not starting at StJan

StJan VLAN switch also has regular plain switch connected to unit which
requires aliases interfaces. This requires the dhcpd.conf to include this
aliases into a shared network else dhcpd refuses to start.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r14053 r14054  
    210210        datadump[key]['autogen_ifbase'] = key.split('_')[1]
    211211        datadump[key]['autogen_vlan'] = False
     212        datadump[key]['autogen_vlan_alias'] = False
    212213
    213214        datadump[key]['autogen_bridge_member'] = datadump[key].has_key('parent')
     
    232233          datadump[key]['autogen_ifname'] = '_'.join(key.split('_')[1:])
    233234          if len(key.split('_')) > 2 and key.split('_')[2].isdigit():
     235            datadump[key]['autogen_if_dhcp'] = '.'.join(key.split('_')[1:3])
    234236            datadump[key]['autogen_vlan'] = key.split('_')[2]
     237            datadump[key]['autogen_vlan_alias'] = '_alias' in key
    235238            datadump[key]['autogen_iface'] = '.'.join(key.split('_')[1:])
    236239            datadump[key]['autogen_if_dhcp'] = datadump[key]['autogen_ifname']
    237240          else:
     241            datadump[key]['autogen_if_dhcp'] = datadump[key]['autogen_ifbase']
    238242            datadump[key]['autogen_iface'] = '_'.join(key.split('_')[1:])
    239243            datadump[key]['autogen_if_dhcp'] = datadump[key]['autogen_ifbase']
    240         print key,datadump[key]['autogen_iface'], datadump[key]['autogen_ifname'], datadump[key]['autogen_if_dhcp']
    241244
    242245    except Exception as exc:
Note: See TracChangeset for help on using the changeset viewer.