Changeset 10366 in genesis
- Timestamp:
- Apr 7, 2012, 10:08:14 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r10365 r10366 410 410 addrs_list = { 'lo0' : [("127.0.0.1/8", "LocalHost"), ("172.31.255.1/32","Proxy IP")] } 411 411 iface_map = {'lo0' : 'lo0'} 412 dhclient_if = {'lo0' : False} 412 413 413 414 masterip_used = False … … 423 424 ifname = ifacedump['autogen_ifname'] 424 425 425 # Write DHCLIENT entry 426 if ifacedump.has_key('dhcpclient') and ifacedump['dhcpclient']: 427 output += "ifconfig_%s='SYNCDHCP'" % ifacedump['autogen_ifname'] 426 # Flag dhclient is possible 427 dhclient_if[ifname] = ifacedump.has_key('dhcpclient') and ifacedump['dhcpclient'] 428 428 429 429 # Add interface IP to list … … 475 475 for addr, comment in sorted(addrs,key=lambda x: parseaddr(x[0].split('/')[0])): 476 476 output += "# %s || %s || %s\n" % (iface, addr, comment) 477 output += "ipv4_addrs_%s='%s'\n\n" % (iface, " ".join([x[0] for x in addrs])) 477 478 # Write DHCLIENT entry 479 if dhclient_if[iface]: 480 output += "ifconfig_%s='SYNCDHCP'\n\n" % (iface) 481 else: 482 output += "ipv4_addrs_%s='%s'\n\n" % (iface, " ".join([x[0] for x in addrs])) 478 483 479 484 return output
Note:
See TracChangeset
for help on using the changeset viewer.