mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
ubuntu is switching from upstart to systemd
This commit is contained in:
parent
7dbfaffe3e
commit
bfcab32885
@ -47,6 +47,7 @@ import os
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
import salt.modules.cmdmod
|
||||
from salt.modules.systemd import _sd_booted
|
||||
|
||||
__func_alias__ = {
|
||||
'reload_': 'reload'
|
||||
@ -61,7 +62,9 @@ def __virtual__():
|
||||
Only work on Ubuntu
|
||||
'''
|
||||
# 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__
|
||||
elif __grains__['os'] in ('Debian', 'Raspbian'):
|
||||
debian_initctl = '/sbin/initctl'
|
||||
|
Loading…
Reference in New Issue
Block a user