1
0
Fork 0

Adding rediffed patch from ubuntu to honor debconf daily scan in systemd unit.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:03:22 +01:00
parent dd4f1212f1
commit 2839baeae2
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
2 changed files with 18 additions and 0 deletions

View file

@ -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'

View file

@ -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