The previous testing was misleading.

First of all, /run is a temporary folder:
> 9.1.4. /run and /run/lock
> The directory /run is cleared at boot, normally by being a mount point for a 
> temporary file system
 - https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock


we would only have  /run/systemd/system  if we booted with systemd.


However, if we were actively using systemd and tried to remove the
systemd package we would hit this code in prerm:

> $ cat /var/lib/dpkg/info/systemd.prerm
> #! /bin/sh
> 
> set -e
> 
> #
> # Prevent systemd from being removed if it's the active init.  That
> # will not work.
> #
> 
> if [ "$1" = "remove" ] && [ -d /run/systemd/system ]; then
>     echo "systemd is the active init system, please switch to another before 
> removing systemd."
>     exit 1
> fi
>(...)

Thus the check of /run/systemd/system used by dh_systemd_start is
sufficient to ensure the init system to be systemd, in which case there
will be a systemctl.

A system with /run/systemd/system but no systemctl should probably be
considered broken. Specially given that the check
for /run/systemd/system existence appears in multiple places and
packages.


Moving systemd dependency to Recommends should be perfectly safe.

Reply via email to