Changeset 13930 in genesis for tools/gformat.py
- Timestamp:
- Jun 21, 2017, 10:35:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r13929 r13930 225 225 datadump[key]['autogen_bridge_member'] = datadump[key].has_key('parent') 226 226 datadump[key]['autogen_bridge'] = datadump[key]['autogen_ifbase'].startswith('bridge') 227 datadump[key]['autogen_bridge_alias'] = datadump[key]['autogen_ifbase'].startswith('bridge') and '_alias' in key 227 228 228 229 if datadump[key].has_key('parent'): … … 701 702 for iface_key in get_interface_keys(datadump): 702 703 ifacedump = datadump[iface_key] 703 ifname = ifacedump['autogen_ifname'] 704 if ifacedump['autogen_bridge_alias']: 705 ifname = ifacedump['autogen_ifbase'] 706 else: 707 ifname = ifacedump['autogen_ifname'] 704 708 705 709 # If defined as vlan interface … … 710 714 if ifacedump['autogen_bridge_member']: 711 715 bridge_list[ifacedump['parent']].append(ifacedump['autogen_iface']) 716 712 717 713 718 # Flag dhclient is possible … … 980 985 981 986 for iface in bridge_list.keys(): 982 output += " create_args_%s='%s'\n" % (iface, ' '.join(['addm %(iface)s private %(iface)s' % {'iface': x} for x in bridge_list[iface]]))987 output += "ifconfig_%s='%s up'\n" % (iface, ' '.join(['addm %(iface)s private %(iface)s' % {'iface': x} for x in bridge_list[iface]])) 983 988 984 989 # Bridge member interfaces not containing a configuration should be marked active explcitly. … … 1017 1022 if flags_if[iface].has_key('ether'): 1018 1023 output += "ifconfig_%s='link %s'\n" % (iface, flags_if[iface]['ether']) 1024 output += "ifconfig_%s_alias0='inet %s'\n" % (iface, addrs[0][0]) 1025 idx_offset += 1 1026 elif iface in bridge_list: 1019 1027 output += "ifconfig_%s_alias0='inet %s'\n" % (iface, addrs[0][0]) 1020 1028 idx_offset += 1
Note:
See TracChangeset
for help on using the changeset viewer.