mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Disable OpenBSD service module on 5.0, it won't work reliably there.
This commit is contained in:
parent
24df88cb87
commit
81b4344d3f
@ -13,7 +13,11 @@ def __virtual__():
|
||||
Only work on OpenBSD
|
||||
'''
|
||||
if __grains__['os'] == 'OpenBSD' and os.path.exists('/etc/rc.d/rc.subr'):
|
||||
return 'service'
|
||||
v = map(int, __grains__['kernelrelease'].split('.'))
|
||||
# The -f flag, used to force a script to run even if disabled,
|
||||
# was added after the 5.0 release.
|
||||
if v[0] > 5 or (v[0] == 5 and v[1] > 0):
|
||||
return 'service'
|
||||
return False
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user