mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge branch 'obsd-network' of https://github.com/ajacoutot/salt into ajacoutot-obsd-network
This commit is contained in:
commit
78705f339c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user