Description
When using Debian 10 without systemd then debian_service treats it like versions <6 instead as >= 6. Therefore it calls /etc/init.d/[service] instead of service [service]. With Debian 9 everythings works as expected.
Setup
For example run service state in Docker image where sysemd is not booted.
Steps to Reproduce the behavior
Run any command from module service in Debian docker image.
Service modules then tries to execute service commands using /etc/init.d/[service]
Expected behavior
Service modules command executed using `service [service]
Versions Report
Salt Version:
Salt: 3000.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.10
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.7.3 (default, Dec 20 2019, 18:57:59)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10.4
locale: utf-8
machine: x86_64
release: 3.16.0-9-amd64
system: Linux
version: debian 10.4
Additional context
Bug seems to be in _service_cmd where osmajor Debian version is comapred with "6" this results in string comparsion instead of numeric comparsion so "10" < "6" is true.
Oh interesting thanks for submitting @MartinMystikJonas that shouldn't be too bad to fix. 馃槃
Thank you @terminalmage!
Most helpful comment
Fixed in https://github.com/saltstack/salt/pull/57912