summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/mdadm.cron.d12
-rw-r--r--debian/mdadm.cron.daily21
-rw-r--r--debian/mdadm.maintscript2
-rwxr-xr-xdebian/mdadm.postinst2
-rwxr-xr-xdebian/rules3
5 files changed, 6 insertions, 34 deletions
diff --git a/debian/mdadm.cron.d b/debian/mdadm.cron.d
deleted file mode 100644
index 309d180..0000000
--- a/debian/mdadm.cron.d
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# cron.d/mdadm -- schedules periodic redundancy checks of MD devices
-#
-# Copyright © martin f. krafft <madduck@madduck.net>
-# distributed under the terms of the Artistic Licence 2.0
-#
-
-# By default, run at 00:57 on every Sunday, but do nothing unless the day of
-# the month is less than or equal to 7. Thus, only run on the first Sunday of
-# each month. crontab(5) sucks, unfortunately, in this regard; therefore this
-# hack (see #380425).
-57 0 * * 0 root if [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ]; then /usr/share/mdadm/checkarray --cron --all --idle --quiet; fi
diff --git a/debian/mdadm.cron.daily b/debian/mdadm.cron.daily
deleted file mode 100644
index 389d74b..0000000
--- a/debian/mdadm.cron.daily
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# cron.daily/mdadm -- daily check that MD devices are functional
-#
-# Copyright © 2008 Paul Slootman <paul@debian.org>
-# distributed under the terms of the Artistic Licence 2.0
-
-# As recommended by the manpage, run
-# mdadm --monitor --scan --oneshot
-# every day to ensure that any degraded MD devices don't go unnoticed.
-# Email will go to the address specified in /etc/mdadm/mdadm.conf .
-#
-set -eu
-
-MDADM=/sbin/mdadm
-[ -x $MDADM ] || exit 0 # package may be removed but not purged
-
-[ -e /etc/default/mdadm ] && . /etc/default/mdadm
-[ $AUTOSCAN = false ] && exit 0
-
-exec $MDADM --monitor --scan --oneshot
diff --git a/debian/mdadm.maintscript b/debian/mdadm.maintscript
index 1298978..17b5e28 100644
--- a/debian/mdadm.maintscript
+++ b/debian/mdadm.maintscript
@@ -1,2 +1,4 @@
+rm_conffile /etc/cron.d/mdadm 4.2+20230227-1~
+rm_conffile /etc/cron.daily/mdadm 4.2+20230227-1~
rm_conffile /etc/init.d/mdadm 4.2+20230227-1~
rm_conffile /etc/init.d/mdadm-waitidle 4.2+20230227-1~
diff --git a/debian/mdadm.postinst b/debian/mdadm.postinst
index 2314baf..c8a3420 100755
--- a/debian/mdadm.postinst
+++ b/debian/mdadm.postinst
@@ -76,7 +76,7 @@ AUTOCHECK=$AUTOCHECK
# AUTOSCAN:
# should mdadm check once a day for degraded arrays? See
-# /etc/cron.daily/mdadm.
+# /lib/systemd/system/mdmonitor-oneshot.service
AUTOSCAN=$AUTOSCAN
# START_DAEMON:
diff --git a/debian/rules b/debian/rules
index fd82966..e05fee1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,3 +31,6 @@ override_dh_install:
mkdir -p $(CURDIR)/debian/mdadm/etc/mdadm
chmod +x $(CURDIR)/debian/mdadm/usr/share/mdadm/mdcheck
+
+override_dh_installsystemd:
+ dh_installsystemd -pmdadm mdcheck_continue.timer mdcheck_start.timer mdmonitor-oneshot.timer