mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Addressed edge case when attempting to set the config file to 'Disabled'. The state should only check the file, since the in-memory setting won't disappear until after reboot.
This commit is contained in:
parent
6858658cc2
commit
a6a24e1a1b
@ -116,7 +116,7 @@ def mode(name):
|
||||
return ret
|
||||
|
||||
oldmode, mode = mode, __salt__['selinux.setenforce'](tmode)
|
||||
if mode == tmode:
|
||||
if mode == tmode or (tmode == 'Disabled' and __salt__['selinux.getconfig']() == tmode):
|
||||
ret['result'] = True
|
||||
ret['comment'] = 'SELinux has been set to {0} mode'.format(tmode)
|
||||
ret['changes'] = {'old': oldmode,
|
||||
|
Loading…
Reference in New Issue
Block a user