Package: mdadm
Tags: patch
Dear Maintainer(s),
The canonical way to detect whether systemd is running is to check
whether the /run/systemd/system/ directory exists. Currently
mdadm.config uses "pidof systemd", which is not reliable and
non-canonical. Moreover, we are working to remove the 'essential' flag
from pidof, to reduce the essential set, and this is one of the last
few packages using it.
Please consider applying the following patch to switch to the
canonical detection mechanism:
--- a/debian/mdadm.config
+++ b/debian/mdadm.config
@@ -39,7 +39,7 @@ if findmnt / 2>/dev/null | grep -qs \/dev\/md && \
# and system is not a chroot
[ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ] && \
# and systemd is not running
-[ -z "$(pidof systemd)" ]
+[ ! -d /run/systemd/system ]
then
db_input high mdadm/init-system-not-systemd || true
db_go