mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
don't load freebsdpkg when providers:pkg == 'pkgng'
This commit is contained in:
parent
00cd8524da
commit
ef4a9f9a93
@ -86,9 +86,18 @@ __virtualname__ = 'pkg'
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
Load as 'pkg' on FreeBSD versions less than 10
|
||||
Load as 'pkg' on FreeBSD versions less than 10.
|
||||
Don't load on FreeBSD 9 when the config option
|
||||
``providers:pkg`` is set to 'pkgng'.
|
||||
'''
|
||||
if __grains__['os'] == 'FreeBSD' and float(__grains__['osrelease']) < 10:
|
||||
providers = {}
|
||||
if 'providers' in __opts__:
|
||||
providers = __opts__['providers']
|
||||
if providers and 'pkg' in providers and providers['pkg'] == 'pkgng':
|
||||
log.debug('Configuration option \'providers:pkg\' is set to '\
|
||||
'\'pkgng\', won\'t load old provider \'freebsdpkg\'.')
|
||||
return False
|
||||
return __virtualname__
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user