Merge pull request #15434 from thatch45/ajacoutot-obsd-network

Merge #15430
This commit is contained in:
Thomas S Hatch 2014-09-02 11:04:59 -06:00
commit 294ea72d94

View File

@ -418,7 +418,12 @@ def arp():
comps = line.split()
if len(comps) < 4:
continue
ret[comps[3]] = comps[1].strip('(').strip(')')
if not __grains__['kernel'] == 'OpenBSD':
ret[comps[3]] = comps[1].strip('(').strip(')')
else:
if comps[0] == 'Host' or comps[1] == '(incomplete)':
continue
ret[comps[1]] = comps[0]
return ret
@ -611,6 +616,9 @@ def mod_hostname(hostname):
elif __grains__['os_family'] == 'Debian':
with salt.utils.fopen('/etc/hostname', 'w') as fh:
fh.write(hostname + '\n')
elif __grains__['os_family'] == 'OpenBSD':
with salt.utils.fopen('/etc/myname', 'w') as fh:
fh.write(hostname + '\n')
return True