|
def __virtual__():
'''
Only work on systems which exclusively use sysvinit
'''
# Disable on these platforms, specific service modules exist:
disable = set((
'RedHat',
'CentOS',
'Amazon',
'ScientificLinux',
'CloudLinux',
'Fedora',
'Gentoo',
'Ubuntu',
'Debian',
'Arch',
'Arch ARM',
'ALT',
'SUSE Enterprise Server',
'OEL',
'Linaro',
'elementary OS',
'McAfee OS Server'
))
if __grains__.get('os', '') in disable:
return False
# Disable on all non-Linux OSes as well
if __grains__['kernel'] != 'Linux':
return False
# Suse >=12.0 uses systemd
if __grains__.get('os_family', '') == 'Suse':
try:
if int(__grains__.get('osrelease', '').split('.')[0]) >= 12:
return False
except ValueError:
return False
return 'service' |
|
|