mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Updated acl.modfacl to raise any error encountered
This commit is contained in:
parent
4d5aedca62
commit
17447bf8c9
@ -213,8 +213,10 @@ def modfacl(acl_type, acl_name='', perms='', *args, **kwargs):
|
||||
salt '*' acl.modfacl d:u myuser 7 /tmp/house/kitchen
|
||||
salt '*' acl.modfacl g mygroup 0 /tmp/house/kitchen /tmp/house/livingroom
|
||||
salt '*' acl.modfacl user myuser rwx /tmp/house/kitchen recursive=True
|
||||
salt '*' acl.modfacl user myuser rwx /tmp/house/kitchen raise_err=True
|
||||
'''
|
||||
recursive = kwargs.pop('recursive', False)
|
||||
raise_err = kwargs.pop('raise_err', False)
|
||||
|
||||
_raise_on_no_files(*args)
|
||||
|
||||
@ -228,7 +230,7 @@ def modfacl(acl_type, acl_name='', perms='', *args, **kwargs):
|
||||
|
||||
for dentry in args:
|
||||
cmd += ' "{0}"'.format(dentry)
|
||||
__salt__['cmd.run'](cmd, python_shell=False)
|
||||
__salt__['cmd.run'](cmd, python_shell=False, raise_err=raise_err)
|
||||
return True
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user