Disable OpenBSD service module on 5.0, it won't work reliably there.

This commit is contained in:
Joshua Elsasser 2012-07-15 07:56:28 -07:00
parent 24df88cb87
commit 81b4344d3f

View File

@ -13,6 +13,10 @@ def __virtual__():
Only work on OpenBSD Only work on OpenBSD
''' '''
if __grains__['os'] == 'OpenBSD' and os.path.exists('/etc/rc.d/rc.subr'): if __grains__['os'] == 'OpenBSD' and os.path.exists('/etc/rc.d/rc.subr'):
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 'service'
return False return False