Removing cron jobs in favour of systemd timers.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
c79ce7ed80
commit
37f97e85df
5 changed files with 6 additions and 34 deletions
12
debian/mdadm.cron.d
vendored
12
debian/mdadm.cron.d
vendored
|
@ -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
|
21
debian/mdadm.cron.daily
vendored
21
debian/mdadm.cron.daily
vendored
|
@ -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
|
2
debian/mdadm.maintscript
vendored
2
debian/mdadm.maintscript
vendored
|
@ -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~
|
||||
|
|
2
debian/mdadm.postinst
vendored
2
debian/mdadm.postinst
vendored
|
@ -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
3
debian/rules
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue