Merge pull request #29821 from abednarik/virtual_ret_freebsd_sysctl_module

modules.freebsd_sysctl: __virtual__ return err msg.
This commit is contained in:
Mike Place 2015-12-18 09:20:13 -07:00
commit 08e06b0c45

View File

@ -14,9 +14,12 @@ __virtualname__ = 'sysctl'
def __virtual__():
'''
Only run on FreeBSD systems
Only runs on FreeBSD systems
'''
return __virtualname__ if __grains__['os'] == 'FreeBSD' else False
if __grains__['os'] == 'FreeBSD':
return __virtualname__
return (False, 'The freebsd_sysctl execution module cannot be loaded: '
'only available on FreeBSD systems.')
def _formatfor(name, value, config, tail=''):