Fix bad interface name for speed hack.

parent 5f0924ff
...@@ -392,6 +392,11 @@ class Computer(object): ...@@ -392,6 +392,11 @@ class Computer(object):
# Speed hack: # Speed hack:
# Blindly add all IPs from existing configuration, just to speed up actual # Blindly add all IPs from existing configuration, just to speed up actual
# computer configuration later on. # computer configuration later on.
# XXX-TODO: only add an address if it doesn't already exist.
if self.ipv6_interface:
interface_name = self.ipv6_interface
else:
interface_name = self.name
for partition in self.partition_list: for partition in self.partition_list:
try: try:
for address in partition.address_list: for address in partition.address_list:
...@@ -401,7 +406,7 @@ class Computer(object): ...@@ -401,7 +406,7 @@ class Computer(object):
continue continue
callAndRead(['ip', 'addr', 'add', callAndRead(['ip', 'addr', 'add',
'%s/%s' % (address['addr'], netmask), '%s/%s' % (address['addr'], netmask),
'dev', self.interface.name]) 'dev', interface_name])
except ValueError: except ValueError:
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment