Merge pull request #31932 from sjorge/2016.3-badrebasesystembroken

fix broken system module on SunOS cause by a0a66fa32600751d394d724b2f…
This commit is contained in:
Nicole Thomas 2016-03-17 08:46:20 -06:00
commit 11642ed5b3

View File

@ -12,7 +12,7 @@ __virtualname__ = 'system'
def __virtual__():
'''
Only supported on POSIX-like systems
Windows and Mac have their own modules
Windows, Solaris, and Mac have their own modules
'''
if salt.utils.is_windows():
return (False, 'This module is not available on windows')
@ -20,6 +20,9 @@ def __virtual__():
if salt.utils.is_darwin():
return (False, 'This module is not available on Mac OS')
if salt.utils.is_sunos():
return (False, 'This module is not available on SunOS')
if not salt.utils.which('shutdown'):
return (False, 'The system execution module failed to load: '
'only available on Linux systems with shutdown command.')