diff options
author | root <root@rshg047.dnsready.net> | 2011-04-20 05:15:36 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-04-20 05:15:36 +0000 |
commit | 862a468489b5081755f9086204a012c7cd3beb3e (patch) | |
tree | 6ab46fa059be2927c621a1d526f6f95e6a4033e1 /community-testing | |
parent | 8f4f6fea0e8f06647b3e06c003069c93b5b033b4 (diff) |
Wed Apr 20 05:15:36 UTC 2011
Diffstat (limited to 'community-testing')
-rw-r--r-- | community-testing/cronie/PKGBUILD | 56 | ||||
-rw-r--r-- | community-testing/cronie/anacrontab | 15 | ||||
-rw-r--r-- | community-testing/cronie/crond.pam.d | 11 | ||||
-rwxr-xr-x | community-testing/cronie/crond.rc.d | 38 | ||||
-rw-r--r-- | community-testing/cronie/crontab | 13 | ||||
-rwxr-xr-x | community-testing/cronie/run-cron | 38 |
6 files changed, 171 insertions, 0 deletions
diff --git a/community-testing/cronie/PKGBUILD b/community-testing/cronie/PKGBUILD new file mode 100644 index 000000000..15b7e1dd0 --- /dev/null +++ b/community-testing/cronie/PKGBUILD @@ -0,0 +1,56 @@ +# $Id: PKGBUILD 45295 2011-04-19 04:31:20Z kchen $ +# Maintainer: Kaiting Chen <kaiting.chen@kiwilight.com> + +pkgname=cronie +pkgver=1.4.7 +pkgrel=1 +pkgdesc='Fedora fork of vixie-cron with PAM support' +arch=('i686' 'x86_64') +url='https://fedorahosted.org/cronie/' +license=('custom:ISC') +backup=( + 'etc/crontab' 'etc/anacrontab' 'etc/pam.d/crond') +provides=('cron' 'dcron') +depends=('pam') +source=("https://fedorahosted.org/releases/c/r/$pkgname/$pkgname-$pkgver.tar.gz" + 'crontab' 'anacrontab' 'crond.pam.d' 'crond.rc.d' 'run-cron') +md5sums=('dfc26c47756d0c40ee27ae3c7ee98e0d' + '213994f8404ad2d2da18a9e0ce878a16' + 'b87041532eb123a3194b95dbe7fb284c' + 'd688904def891b8037dc3a06ab047f03' + '9b415c8a1faa44aa0538dcea88b432ec' + '00ede56aadf073c839e600033fbd6cb4') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-anacron \ + --without-audit \ + --without-selinux \ + --with-pam --with-inotify + make; make DESTDIR=$pkgdir install + + # Must set suid bit on file manually + chmod u+s $pkgdir/usr/bin/crontab + + # Install `run-cron` script + install -Dm755 $srcdir/run-cron $pkgdir/usr/bin/run-cron + + # Install system crontab and anacrontab and directories + install -Dm644 $srcdir/crontab $pkgdir/etc/crontab + install -Dm644 $srcdir/anacrontab $pkgdir/etc/anacrontab + install -d $pkgdir/etc/cron.d + install -d $pkgdir/etc/cron.{hour,dai,week,month}ly + + # Replaced Fedora PAM configuration + install -Dm644 $srcdir/crond.pam.d $pkgdir/etc/pam.d/crond + + # Install crond initscript + install -Dm755 $srcdir/crond.rc.d $pkgdir/etc/rc.d/crond + + # Install custom:ISC license + install -Dm644 COPYING $pkgdir/usr/share/licenses/cronie/COPYING +} diff --git a/community-testing/cronie/anacrontab b/community-testing/cronie/anacrontab new file mode 100644 index 000000000..e9985b053 --- /dev/null +++ b/community-testing/cronie/anacrontab @@ -0,0 +1,15 @@ +### /etc/anacrontab: Main configuration for `anacron` +# See anacron(8) and anacrontab(5) for details + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +SHELL=/bin/bash +HOME=/var/empty +RANDOM_DELAY=45 +START_HOURS_RANGE=3-22 + +# Format: Period(day) Delay(minute) Name Command +30 15 cron.monthly run-cron /etc/cron.monthly + 1 5 cron.daily run-cron /etc/cron.daily + 7 10 cron.weekly run-cron /etc/cron.weekly + +### /etc/anacrontab: Main configuration for `anacron` diff --git a/community-testing/cronie/crond.pam.d b/community-testing/cronie/crond.pam.d new file mode 100644 index 000000000..4863ba834 --- /dev/null +++ b/community-testing/cronie/crond.pam.d @@ -0,0 +1,11 @@ +### /etc/pam.d/crond: PAM configuration for `crond` + +account required pam_access.so +account required pam_time.so +account required pam_unix.so + +session required pam_limits.so +session required pam_env.so +session required pam_unix.so + +### /etc/pam.d/crond: PAM configuration for `crond` diff --git a/community-testing/cronie/crond.rc.d b/community-testing/cronie/crond.rc.d new file mode 100755 index 000000000..8b05e65d7 --- /dev/null +++ b/community-testing/cronie/crond.rc.d @@ -0,0 +1,38 @@ +#!/bin/bash + +### /etc/rc.d/crond: Initscript for Cron Daemon + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/crond` +case "$1" in + start) + stat_busy "Starting Cron Daemon" + [ -z "$PID" ] && \ + /usr/sbin/crond &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else stat_done; add_daemon crond + echo $PID > /var/run/crond.pid + fi ;; + stop) + stat_busy "Stopping Cron Daemon" + [ ! -z "$PID" ] \ + && kill $PID &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + stat_done; rm_daemon crond + fi ;; + restart) + $0 stop + sleep 1 + $0 start ;; + *) + echo "usage: $0 {start|stop|restart}" +esac + +exit 0 + +### /etc/rc.d/crond: Initscript for Cron Daemon diff --git a/community-testing/cronie/crontab b/community-testing/cronie/crontab new file mode 100644 index 000000000..4e8b66397 --- /dev/null +++ b/community-testing/cronie/crontab @@ -0,0 +1,13 @@ +### /etc/crontab: Master crontab for system `crond` + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +SHELL=/bin/bash +HOME=/var/empty + +# Format: Minute Hour Date Month Wday User Command + +01 * * * * root run-cron /etc/cron.hourly +@reboot root anacron -s +04 4 * * * root anacron -s + +### /etc/crontab: Master crontab for system `crond` diff --git a/community-testing/cronie/run-cron b/community-testing/cronie/run-cron new file mode 100755 index 000000000..5c62e3377 --- /dev/null +++ b/community-testing/cronie/run-cron @@ -0,0 +1,38 @@ +#!/bin/bash + +# run-parts - concept taken from Debian + +# keep going when something fails +set +e + +if [ $# -lt 1 ]; then + echo "Usage: run-parts <dir>" + exit 1 +fi + +if [ ! -d $1 ]; then + echo "Not a directory: $1" + exit 1 +fi + +# Ignore *~ and *, scripts +for i in $1/*[^~,] ; do + [ -d $i ] && continue + # Don't run *.{pacsave,pacorig,pacnew,swp} scripts + [ "${i%.pacsave}" != "${i}" ] && continue + [ "${i%.pacorig}" != "${i}" ] && continue + [ "${i%.pacnew}" != "${i}" ] && continue + [ "${i%.swp}" != "${i}" ] && continue + [ "${i%,v}" != "${i}" ] && continue + + if [ -x $i ]; then + $i 2>&1 | awk -v "progname=$i" \ + 'progname { + print progname ":\n" + progname=""; + } + { print; }' + fi +done + +exit 0 |