Is Whonix 11 using systemd functions in bash, python scripts?

Does Whonix 11 use systemd functions for checking status and such from within Whonix bash scripts?

Even though there are compatibility functions for old sysinitv configuration files, they are not always reliable.

systemctl is-enabled tor
systemctl is-active tor
systemctl is-failed tor
systemctl status tor
systemctl mask tor  # Make service impossible to run

In python, there is a systemd library that can be used to interface with systems, or use of python-sh

I don’t get notifications of topics, so maybe create a task if this not complete

Please see:

Good point.

[quote=“nrgaway, post:1, topic:1083”]Does Whonix 11 use systemd functions for checking status and such from within Whonix bash scripts?

Even though there are compatibility functions for old sysinitv configuration files, they are not always reliable.[/quote]

Yes. From ./packages folder…

grep -r --exclude-dir '.git*' --exclude README.md --exclude changelog.upstream --exclude GPLv3 "service " *

I would like to keep ‘service’ if sane/possible. ‘service’ seems to be an agnostic wrapper that works with sysvinit, upstart and systemd. Using ‘systemctl’ would make the package systemd-only. And would also require loads of package changes. Maybe let’s only change it where needed.

‘service’ seems like a not-too-difficult-to-grasp ™ sh script that is easy to debug.

sudo sh -x /usr/sbin/service sdwdate status

Will check if all that stuff is still functional.
Will also check for related sysvinit-utils (contains ‘service’) bugs.
https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=sysvinit-utils;dist=unstable

[quote=“Patrick, post:3, topic:1083”]Good point.

Yes. From ./packages folder…

grep -r --exclude-dir '.git*' --exclude README.md --exclude changelog.upstream --exclude GPLv3 "service " *

I would like to keep ‘service’ if sane/possible. ‘service’ seems to be an agnostic wrapper that works with sysvinit, upstart and systemd. Using ‘systemctl’ would make the package systemd-only. And would also require loads of package changes. Maybe let’s only change it where needed.

‘service’ seems like a not-too-difficult-to-grasp ™ sh script that is easy to debug.

sudo sh -x /usr/sbin/service sdwdate status

Will check if all that stuff is still functional.
Will also check for related sysvinit-utils (contains ‘service’) bugs.
https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=sysvinit-utils;dist=unstable[/quote]

I had issues using service. I was using them in qubes-whonix and services were not being enable/disabled properly when there was an alias and both sysinit and systemd files. I can’t recall exactly what was giving me issues, it was either control-port…-python or Tor or both. It was only enabling the sysinitv configurations when using service and not systemd unit files.

I had issues using service. I was using them in qubes-whonix and services were not being enable/disabled properly when there was an alias and both sysinit and systemd files. I can't recall exactly what was giving me issues, it was either control-port..-python or Tor or both. It was only enabling the sysinitv configurations when using service and not systemd unit files.
Probably not an issue with 'service'. Probably it was the "don't use spaces in systemd unit files" issue: - https://phabricator.whonix.org/T316 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786418 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786421

[hr]

Created a ticket as reminder for this…
check if invocations of ‘service’ by Whonix scripts in Whonix 11 is functional:
https://phabricator.whonix.org/T331

Done. No issues.