modules/debian_service.py: add NILinuxRT support

The NILinuxRT family uses the systemv init system. The module works
as-is.

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
This commit is contained in:
Alejandro del Castillo 2018-01-17 07:57:58 -06:00
parent fcae94126b
commit 848537f3f9
2 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,7 @@ def __virtual__():
'''
Only work on Debian and when systemd isn't running
'''
if __grains__['os'] in ('Debian', 'Raspbian', 'Devuan') and not salt.utils.systemd.booted(__context__):
if __grains__['os'] in ('Debian', 'Raspbian', 'Devuan', 'NILinuxRT') and not salt.utils.systemd.booted(__context__):
return __virtualname__
else:
return (False, 'The debian_service module could not be loaded: '

View File

@ -25,6 +25,9 @@ class ServiceModuleTest(ModuleCase):
elif os_family == 'Arch':
self.service_name = 'systemd-journald'
cmd_name = 'systemctl'
elif os_family == 'NILinuxRT':
self.service_name = 'syslog'
cmd_name = 'syslog-ng'
elif os_family == 'MacOS':
self.service_name = 'org.ntp.ntpd'