fix for illumos/solaris hwaddr

This commit is contained in:
Jorge Schrauwen 2016-02-19 22:45:14 +00:00
parent 6ee17f905b
commit bbd2fdc96d

View File

@ -518,6 +518,11 @@ def _interfaces_ifconfig(out):
iface = miface.group(1) iface = miface.group(1)
if mmac: if mmac:
data['hwaddr'] = mmac.group(1) data['hwaddr'] = mmac.group(1)
if salt.utils.is_sunos():
expand_mac = []
for chunk in data['hwaddr'].split(':'):
expand_mac.append('0{0}' if len(chunk) < 2 else '{0}'.format(chunk))
data['hwaddr'] = expand_mac.join(':')
if mip: if mip:
if 'inet' not in data: if 'inet' not in data:
data['inet'] = list() data['inet'] = list()