From d129fece2883e34c579ac51d7002b4816e276851 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 18 Jun 2023 07:24:42 +0200 Subject: Adding debconf note when run on non-systemd systems (Closes: #1037496). Signed-off-by: Daniel Baumann --- debian/mdadm.config | 13 +++++++++++++ debian/mdadm.templates | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/debian/mdadm.config b/debian/mdadm.config index 02d6b43..848e6b6 100644 --- a/debian/mdadm.config +++ b/debian/mdadm.config @@ -32,6 +32,19 @@ fi db_capb escape +# if system has root on md +if findmnt / 2>/dev/null | grep -qs \/dev\/md && \ +# and system is not a container +! grep -qs ':cpuset:/$' /proc/1/cgroup && \ +# 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)" ] +then + db_input high mdadm/init-system-not-systemd || true + db_go +fi + db_input medium mdadm/autocheck || : db_go diff --git a/debian/mdadm.templates b/debian/mdadm.templates index 92b38a6..7d2b685 100644 --- a/debian/mdadm.templates +++ b/debian/mdadm.templates @@ -7,6 +7,16 @@ # Even minor modifications require translation updates and such # changes should be coordinated with translators and reviewers. +Template: mdadm/init-system-not-systemd +Type: note +_Description: no systemd init-system detected + The root filesystem of this system was detected to be on a RAID device, + so mdadm might be required to run during boot to properly start your system. + . + Beginning with newer versions of the mdadm package, init-system integration + is available for systemd only. This system seems to use an alternative + init-system which might or might not leave your system unbootable. + Template: mdadm/autocheck Type: boolean Default: true -- cgit v1.2.3