summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/dcron
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/dcron
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core-testing/dcron')
-rw-r--r--abs/core-testing/dcron/PKGBUILD38
-rwxr-xr-xabs/core-testing/dcron/crond37
-rw-r--r--abs/core-testing/dcron/crond.logrotate5
-rw-r--r--abs/core-testing/dcron/dcron-3.1.patch33
-rw-r--r--abs/core-testing/dcron/root.crontab12
-rwxr-xr-xabs/core-testing/dcron/run-cron14
6 files changed, 139 insertions, 0 deletions
diff --git a/abs/core-testing/dcron/PKGBUILD b/abs/core-testing/dcron/PKGBUILD
new file mode 100644
index 0000000..e5a46d8
--- /dev/null
+++ b/abs/core-testing/dcron/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=dcron
+pkgver=3.2
+pkgrel=12
+pkgdesc="Dillon's Cron Daemon"
+arch=(i686 x86_64)
+license=('GPL')
+groups=('base')
+url="http://apollo.backplane.com/FreeSrc/"
+backup=(var/spool/cron/root)
+depends=('glibc')
+provides=('cron')
+source=(http://apollo.backplane.com/FreeSrc/dcron32.tgz
+ dcron-3.1.patch
+ root.crontab
+ crond
+ crond.logrotate
+ run-cron)
+md5sums=('c2c816deb389b4bfb00761f26afe3efd' '2f0c3f7497a12c8826c9be3f87843fcd'\
+ '7fcc06b13708ebd667711b1fbf62ee6e' 'd7edac165ef19ebb9d0089bdc218b53a'\
+ 'aeabcd5e4924d1a7593c8782d1068c86' '5ff0cdcb9ec99778938ac6ef26800327')
+
+build() {
+ cd $startdir/src/dcron
+ patch -Np1 -i ../dcron-3.1.patch || return 1
+ make || return 1
+ install -D -m4755 crontab $startdir/pkg/usr/bin/crontab
+ install -D -m755 crond $startdir/pkg/usr/sbin/crond
+ install -D -m644 crontab.1 $startdir/pkg/usr/man/man1/crontab.1
+ install -D -m644 crond.8 $startdir/pkg/usr/man/man8/crond.8
+ mkdir -p $startdir/pkg/var/spool/cron $startdir/pkg/etc/cron.d
+ mkdir -p $startdir/pkg/etc/{rc.d,cron.hourly,cron.daily,cron.weekly,cron.monthly}
+ install -D -m0600 ../root.crontab $startdir/pkg/var/spool/cron/root
+ install -D -m755 ../crond $startdir/pkg/etc/rc.d/crond
+ install -D -m644 ../crond.logrotate $startdir/pkg/etc/logrotate.d/crond
+ install -D -m755 ../run-cron $startdir/pkg/usr/sbin/run-cron
+}
diff --git a/abs/core-testing/dcron/crond b/abs/core-testing/dcron/crond
new file mode 100755
index 0000000..ef80db3
--- /dev/null
+++ b/abs/core-testing/dcron/crond
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /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 >>/var/log/crond 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ PID=`pidof -o %PPID /usr/sbin/crond`
+ echo $PID >/var/run/crond.pid
+ add_daemon crond
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Cron Daemon"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon crond
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/core-testing/dcron/crond.logrotate b/abs/core-testing/dcron/crond.logrotate
new file mode 100644
index 0000000..38299d6
--- /dev/null
+++ b/abs/core-testing/dcron/crond.logrotate
@@ -0,0 +1,5 @@
+/var/log/crond {
+ sharedscripts
+ copytruncate
+ missingok
+}
diff --git a/abs/core-testing/dcron/dcron-3.1.patch b/abs/core-testing/dcron/dcron-3.1.patch
new file mode 100644
index 0000000..975d51c
--- /dev/null
+++ b/abs/core-testing/dcron/dcron-3.1.patch
@@ -0,0 +1,33 @@
+diff -Naur dcron-orig/defs.h dcron/defs.h
+--- dcron-orig/defs.h 2006-04-29 10:20:58.000000000 -0700
++++ dcron/defs.h 2006-05-04 18:40:05.000000000 -0700
+@@ -28,7 +28,7 @@
+ #define arysize(ary) (sizeof(ary)/sizeof((ary)[0]))
+
+ #ifndef CRONTABS
+-#define CRONTABS "/var/spool/cron/crontabs"
++#define CRONTABS "/var/spool/cron"
+ #endif
+ #ifndef SCRONTABS
+ #define SCRONTABS "/etc/cron.d"
+@@ -44,7 +44,7 @@
+ #if defined(__DragonFly__)
+ #define SENDMAIL "/usr/sbin/sendmail"
+ #else
+-#define SENDMAIL "/usr/lib/sendmail"
++#define SENDMAIL "/usr/sbin/sendmail"
+ #endif
+ #endif
+
+diff -Naur dcron-orig/subs.c dcron/subs.c
+--- dcron-orig/subs.c 2006-04-27 10:29:56.000000000 -0700
++++ dcron/subs.c 2006-05-04 18:40:19.000000000 -0700
+@@ -79,7 +79,7 @@
+
+ buf[0] = 0;
+ if (useDate)
+- strftime(buf, 128, "%d-%b-%y %H:%M ", tp);
++ strftime(buf, 128, "%d-%b-%Y %H:%M ", tp);
+ vsnprintf(buf + strlen(buf), nmax, ctl, va);
+ return(strlen(buf));
+ }
diff --git a/abs/core-testing/dcron/root.crontab b/abs/core-testing/dcron/root.crontab
new file mode 100644
index 0000000..726558f
--- /dev/null
+++ b/abs/core-testing/dcron/root.crontab
@@ -0,0 +1,12 @@
+#
+# DO NOT EDIT THIS FILE MANUALLY!! USE crontab -e INSTEAD.
+#
+
+# <minute> <hour> <day> <month> <dow> <command>
+
+
+01 * * * * /usr/sbin/run-cron /etc/cron.hourly
+02 00 * * * /usr/sbin/run-cron /etc/cron.daily
+22 00 * * 0 /usr/sbin/run-cron /etc/cron.weekly
+42 00 1 * * /usr/sbin/run-cron /etc/cron.monthly
+
diff --git a/abs/core-testing/dcron/run-cron b/abs/core-testing/dcron/run-cron
new file mode 100755
index 0000000..51007a1
--- /dev/null
+++ b/abs/core-testing/dcron/run-cron
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+
+if [ -z $1 ]; then
+ echo "Usage: $0 crondir"
+ exit 1
+fi
+
+for cron in $1/* ; do
+ if [ -x $cron ]; then
+ $cron
+ fi
+done
+unset cron