Merge pull request #3404 from giantlock/develop

fix #3403
This commit is contained in:
Thomas S Hatch 2013-01-23 19:57:38 -08:00
commit bc5ec217a7

View File

@ -47,13 +47,15 @@ def show():
cmd = 'sysctl -ae'
ret = {}
out = __salt__['cmd.run'](cmd).splitlines()
comps = ['']
for line in out:
if line.split('.')[0] not in roots:
comps = line.split('=')
if any([line.startswith('{0}.'.format(root)) for root in roots]):
comps = line.split('=', 1)
ret[comps[0]] = comps[1]
elif comps[0]:
ret[comps[0]] += '{0}\n'.format(line)
else:
continue
comps = line.split('=')
ret[comps[0]] = comps[1]
return ret