ubuntu is switching from upstart to systemd

This commit is contained in:
Sebastian Braun 2015-02-18 02:48:59 +01:00
parent 7dbfaffe3e
commit bfcab32885

View File

@ -47,6 +47,7 @@ import os
# Import salt libs # Import salt libs
import salt.utils import salt.utils
import salt.modules.cmdmod import salt.modules.cmdmod
from salt.modules.systemd import _sd_booted
__func_alias__ = { __func_alias__ = {
'reload_': 'reload' 'reload_': 'reload'
@ -61,7 +62,9 @@ def __virtual__():
Only work on Ubuntu Only work on Ubuntu
''' '''
# Disable on these platforms, specific service modules exist: # Disable on these platforms, specific service modules exist:
if __grains__['os'] in ('Ubuntu', 'Linaro', 'elementary OS'): if _sd_booted(__context__):
return False
elif __grains__['os'] in ('Ubuntu', 'Linaro', 'elementary OS'):
return __virtualname__ return __virtualname__
elif __grains__['os'] in ('Debian', 'Raspbian'): elif __grains__['os'] in ('Debian', 'Raspbian'):
debian_initctl = '/sbin/initctl' debian_initctl = '/sbin/initctl'