From c2938f5d6c6660c77d610bd07e7482dc5131de7c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 28 Feb 2023 20:12:59 +0100 Subject: Adding rediffed patch from ubuntu to honor debconf daily scan in systemd unit. Signed-off-by: Daniel Baumann --- .../debian/0010-systemd-honor-debconf-daily-scan.patch | 17 +++++++++++++++++ debian/patches/series | 1 + 2 files changed, 18 insertions(+) create mode 100644 debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch diff --git a/debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch b/debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch new file mode 100644 index 0000000..0273500 --- /dev/null +++ b/debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch @@ -0,0 +1,17 @@ +Author: dann frazier +Description: Honor the debconf mdadm/autoscan setting in the systemd timer + There was an mdadm/autoscan template added to allow users to disable this + feature via debconf. This is exposed as a variable in /etc/default/mdadm, + which was processed by a cronjob. Dropping the cronjob and moving to a + systemd timer, we need to add our own processing. + +diff -Naurp mdadm.orig/systemd/mdmonitor-oneshot.service mdadm/systemd/mdmonitor-oneshot.service +--- mdadm.orig/systemd/mdmonitor-oneshot.service ++++ mdadm/systemd/mdmonitor-oneshot.service +@@ -10,4 +10,5 @@ Description=Reminder for degraded MD arr + Documentation=man:mdadm(8) + + [Service] +-ExecStart=BINDIR/mdadm --monitor --oneshot --scan ++EnvironmentFile=-/etc/default/mdadm ++ExecStart=sh -c '[ "$AUTOSCAN" != "true" ] || BINDIR/mdadm --monitor --oneshot --scan' diff --git a/debian/patches/series b/debian/patches/series index 2ca96a7..93bdb4d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,4 @@ debian/0006-readlink-path.patch debian/0007-no-Werror.patch debian/0008-test-installed.patch debian/0009-randomize-timers.patch +debian/0010-systemd-honor-debconf-daily-scan.patch -- cgit v1.2.3