summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-28 19:12:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-28 19:45:00 +0000
commitc2938f5d6c6660c77d610bd07e7482dc5131de7c (patch)
treee991a1e477734841c7157a8bb8fb1d022ef1608d
parentAdding rediffed patch from ubuntu to randomize md array check timers. (diff)
downloadmdadm-c2938f5d6c6660c77d610bd07e7482dc5131de7c.tar.xz
mdadm-c2938f5d6c6660c77d610bd07e7482dc5131de7c.zip
Adding rediffed patch from ubuntu to honor debconf daily scan in systemd unit.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch17
-rw-r--r--debian/patches/series1
2 files changed, 18 insertions, 0 deletions
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 <dannf@ubuntu.com>
+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