mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add multiple permissions to a single export
This commit is contained in:
parent
992e8b22cc
commit
6924b1326b
@ -39,12 +39,12 @@ def list_exports(exports='/etc/exports'):
|
||||
if line.startswith('#'):
|
||||
continue
|
||||
comps = line.split()
|
||||
ret[comps[0]] = {'hosts': [], 'options': []}
|
||||
ret[comps[0]] = []
|
||||
for perm in comps[1:]:
|
||||
permcomps = perm.split('(')
|
||||
permcomps[1] = permcomps[1].replace(')', '')
|
||||
ret[comps[0]]['hosts'] = permcomps[0].split(',')
|
||||
ret[comps[0]]['options'] = permcomps[1].split(',')
|
||||
hosts = permcomps[0].split(',')
|
||||
options = permcomps[1].split(',')
|
||||
ret[comps[0]].append({'hosts': hosts, 'options': options})
|
||||
f.close()
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user