summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch')
-rw-r--r--debian/patches/debian/0010-systemd-honor-debconf-daily-scan.patch17
1 files changed, 17 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'