cronie: update to 1.4.8, switch to systemd and drop openrc support.

This commit is contained in:
Juan RP 2011-10-11 05:14:24 +02:00
parent 57df1f1364
commit 5bd975d884
4 changed files with 36 additions and 45 deletions

View file

@ -1,7 +1,10 @@
#
# The PAM configuration file for the cron daemon
#
auth required pam_unix.so nullok_secure use_first_pass
account required pam_unix.so
session required pam_unix.so
session required pam_limits.so
auth required pam_unix.so
auth required pam_env.so
account required pam_access.so
account required pam_unix.so
account required pam_time.so
session required pam_loginuid.so
session required pam_limits.so
session required pam_unix.so

View file

@ -1,23 +0,0 @@
#!/sbin/runscript
command=/usr/sbin/crond
pidfile=/var/run/crond.pid
extra_commands="reload"
depend()
{
need localmount
after bootmisc
}
reload()
{
if [ ! -f "${pidfile}" ]; then
eerror "crond not running"
return 1
fi
ebegin "Reloading configuration and re-opening log file"
start-stop-daemon --stop --oknodo --signal HUP \
--pidfile "${pidfile}"
eend $?
}

View file

@ -0,0 +1,10 @@
[Unit]
Description=Periodic Command Scheduler
[Service]
ExecStart=/usr/sbin/crond -n
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target

View file

@ -1,16 +1,15 @@
# Template file for 'cronie'
pkgname=cronie
version=1.4.7
version=1.4.8
distfiles="https://fedorahosted.org/releases/c/r/cronie/cronie-$version.tar.gz"
build_style=gnu_configure
configure_args="--with-inotify --without-selinux --with-pam --disable-anacron
--with-daemon_username=nobody --with-daemon_groupname=nobody
--localstatedir=/var"
short_desc="Runs specified programs at scheduled times"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="https://fedorahosted.org/cronie/"
license="BSD"
checksum=83bae15ae5504454ba74f4142f5db3aa22be594327fea19d2534f65803137fbd
checksum=a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3
long_desc="
Cronie contains the standard UNIX daemon crond that runs specified programs at
scheduled times and related tools. It is based on the original cron and
@ -18,8 +17,8 @@ long_desc="
SELinux."
keep_empty_dirs=yes
conf_files="/etc/crontab"
openrc_services="crond default true"
conf_files="/etc/crontab /etc/pam.d/crond /etc/cron.deny"
systemd_services="cronie.service"
provides="cron-daemon-0"
replaces="cron-daemon>=0"
@ -30,17 +29,19 @@ Add_dependency build pam-devel
post_install()
{
install -d ${DESTDIR}/etc/cron.d ${DESTDIR}/etc/cron.hourly \
${DESTDIR}/etc/cron.daily ${DESTDIR}/etc/cron.weekly \
${DESTDIR}/etc/cron.monthly ${DESTDIR}/etc/logrotate.d
install -d -m755 ${DESTDIR}/var/spool/cron
vmkdir etc/cron.d
vmkdir etc/cron.hourly
vmkdir etc/cron.daily
vmkdir etc/cron.weekly
vmkdir etc/cron.monthly
vmkdir etc/logrotate.d
vmkdir var/spool/cron
install -D -m755 ${FILESDIR}/crond.rc ${DESTDIR}/etc/init.d/crond
install -m644 ${FILESDIR}/crontab ${DESTDIR}/etc/crontab
install -m644 ${FILESDIR}/crond.logrotate \
${DESTDIR}/etc/logrotate.d/crond
rm -vf ${DESTDIR}/etc/pam.d/crond
install -D -m644 ${FILESDIR}/crond.pam ${DESTDIR}/etc/pam.d/crond
vinstall ${FILESDIR}/cronie.service 644 lib/systemd/system
vinstall ${FILESDIR}/crontab 644 etc
vinstall ${FILESDIR}/crond.logrotate 644 etc/logrotate.d crond
rm -f ${DESTDIR}/etc/pam.d/crond
vinstall ${FILESDIR}/crond.pam 644 etc/pam.d crond
# Add /etc/cron.deny empty, to allow all users.
touch ${DESTDIR}/etc/cron.deny