cronie: enable anacron support. Closes #969.

Patch from @nmeum with minor changes.
This commit is contained in:
Christian Neukirchen 2015-02-14 15:24:09 +01:00
parent bd7d702cbc
commit 857ace875e
2 changed files with 11 additions and 16 deletions

View file

@ -1,10 +0,0 @@
SHELL=/bin/sh
PATH=/usr/sbin:/usr/bin
MAILTO=""
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

View file

@ -1,10 +1,10 @@
# Template file for 'cronie'
pkgname=cronie
version=1.4.12
revision=3
revision=4
build_style=gnu-configure
configure_args="--with-inotify --without-selinux --with-pam
--disable-anacron --localstatedir=/var --enable-pie --enable-relro"
--enable-anacron --localstatedir=/var --enable-pie --enable-relro"
makedepends="pam-devel"
depends="run-parts"
make_dirs="
@ -13,9 +13,9 @@ make_dirs="
/etc/cron.daily 0755 root root
/etc/cron.weekly 0755 root root
/etc/cron.monthly 0755 root root
/etc/cron.yearly 0755 root root
/var/spool/cron 0755 root root"
conf_files="/etc/crontab /etc/pam.d/crond /etc/cron.deny"
/var/spool/cron 0755 root root
/var/spool/anacron 0755 root root"
conf_files="/etc/anacrontab /etc/pam.d/crond /etc/cron.deny"
replaces="cron-daemon>=0"
provides="cron-daemon-0_1"
short_desc="Runs specified programs at scheduled times"
@ -33,12 +33,17 @@ post_install() {
vinstall ${FILESDIR}/cronie.service 644 usr/lib/systemd/system
fi
vsv cronie
vinstall ${FILESDIR}/crontab 644 etc
vinstall ${FILESDIR}/crond.pam 644 etc/pam.d crond
# Add /etc/cron.deny empty, to allow all users.
touch ${DESTDIR}/etc/cron.deny
chmod 644 ${DESTDIR}/etc/cron.deny
# Install anacron related files
vinstall contrib/anacrontab 644 etc
vinstall contrib/0hourly 644 etc/cron.d
vinstall contrib/0anacron 755 etc/cron.hourly
# crontab must be setuid
chmod u+s ${DESTDIR}/usr/bin/crontab
}