mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #41069 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
This commit is contained in:
commit
1179720327
@ -16,6 +16,8 @@ try: # python 3
|
|||||||
except ImportError: # python 2
|
except ImportError: # python 2
|
||||||
from pipes import quote as _cmd_quote
|
from pipes import quote as _cmd_quote
|
||||||
|
|
||||||
|
import getpass
|
||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
import salt.utils
|
import salt.utils
|
||||||
import salt.utils.mac_utils
|
import salt.utils.mac_utils
|
||||||
@ -32,6 +34,9 @@ def __virtual__():
|
|||||||
return (False, 'The mac_system module could not be loaded: '
|
return (False, 'The mac_system module could not be loaded: '
|
||||||
'module only works on MacOS systems.')
|
'module only works on MacOS systems.')
|
||||||
|
|
||||||
|
if getpass.getuser() != 'root':
|
||||||
|
return False, 'The mac_system module is not useful for non-root users.'
|
||||||
|
|
||||||
if not _atrun_enabled():
|
if not _atrun_enabled():
|
||||||
if not _enable_atrun():
|
if not _enable_atrun():
|
||||||
return False, 'atrun could not be enabled on this system'
|
return False, 'atrun could not be enabled on this system'
|
||||||
|
Loading…
Reference in New Issue
Block a user