Changeset 13169 in genesis for tools/gformat.py
- Timestamp:
- Feb 17, 2015, 8:47:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r13079 r13169 217 217 else: 218 218 datadump[key]['autogen_ifname'] = datadump[key]['autogen_ifbase'] 219 datadump[key]['autogen_bridge'] = datadump[key]['autogen_ifbase'].startswith('bridge') 220 if datadump[key]['autogen_bridge'] and not 'alias' in key: 221 datadump[key]['autogen_bridge_interfaces'] = datadump[key]['members'].split() 219 222 except Exception as e: 220 223 print "# Error while processing interface %s" % key … … 653 656 output += ("create_args_%(autogen_ifname)s='wlanmode %(autogen_wlanmode)s mode " +\ 654 657 "%(type)s ssid %(ssid)s %(autogen_extra)s channel %(channel)s'\n") % ifacedump 658 output += "\n" 655 659 656 660 elif ifacedump['type'] in ['ethernet', 'eth']: 657 661 # No special config needed besides IP 658 pass 662 if ifacedump['autogen_bridge']: 663 output += "cloned_interfaces='%(autogen_ifname)s'\n" % ifacedump 664 output += "ifconfig_%s='addm %s up'\n" % (ifacedump['autogen_ifname'], ' addm '.join(ifacedump['autogen_bridge_interfaces'])) 665 for member in ifacedump['autogen_bridge_interfaces']: 666 output += "ifconfig_%s='up'\n" % member 667 output += "\n" 659 668 else: 660 669 assert False, "Unknown type " + ifacedump['type'] … … 839 848 840 849 (addrs_list, dhclient_if, extra_ouput) = make_interface_list(datadump) 841 output += extra_ouput 850 output += extra_ouput.strip() + "\n" 842 851 843 852 # Print IP address which needs to be assigned over here … … 1101 1110 ('ns_type', False), 1102 1111 ('bridge_type', False), 1112 ('members', True), 1103 1113 ('status', True), 1104 1114 )
Note:
See TracChangeset
for help on using the changeset viewer.