mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix detection of runit as init system (grain init)
This commit is contained in:
parent
9e35f5dd08
commit
25b91bb686
1 changed files with 3 additions and 1 deletions
|
@ -1256,7 +1256,7 @@ def os_data():
|
|||
init_cmdline = fhr.read().replace('\x00', ' ').split()
|
||||
init_bin = salt.utils.which(init_cmdline[0])
|
||||
if init_bin is not None and init_bin.endswith('bin/init'):
|
||||
supported_inits = (six.b('upstart'), six.b('sysvinit'), six.b('systemd'), six.b('runit'))
|
||||
supported_inits = (six.b('upstart'), six.b('sysvinit'), six.b('systemd'))
|
||||
edge_len = max(len(x) for x in supported_inits) - 1
|
||||
try:
|
||||
buf_size = __opts__['file_buffer_size']
|
||||
|
@ -1286,6 +1286,8 @@ def os_data():
|
|||
)
|
||||
elif salt.utils.which('supervisord') in init_cmdline:
|
||||
grains['init'] = 'supervisord'
|
||||
elif init_cmdline == ['runit']:
|
||||
grains['init'] = 'runit'
|
||||
else:
|
||||
log.info(
|
||||
'Could not determine init system from command line: ({0})'
|
||||
|
|
Loading…
Add table
Reference in a new issue