1
0
Fork 0

Removing cron jobs in favour of systemd timers.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-14 06:03:21 +01:00
parent c79ce7ed80
commit 37f97e85df
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
5 changed files with 6 additions and 34 deletions

12
debian/mdadm.cron.d vendored
View file

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

View file

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

View file

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

View file

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

3
debian/rules vendored
View file

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