mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
commit
bc5ec217a7
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user