modules.freebsdjail: __virtual__ return err msg.

Added message when return False if OS is not FreeBSD.
Also updated how OS is detected for consistency
This commit is contained in:
abednarik 2015-12-17 21:50:46 -03:00
parent c7d3ac58ef
commit 984d4e0069

View File

@ -20,7 +20,10 @@ def __virtual__():
'''
Only runs on FreeBSD systems
'''
return __virtualname__ if salt.utils.is_freebsd() else False
if __grains__['os'] == 'FreeBSD':
return __virtualname__
return (False, 'The freebsdjail execution module cannot be loaded: '
'only available on FreeBSD systems.')
def start(jail=''):