diff options
author | Ciaran McCreesh <ciaranm@gentoo.org> | 2005-03-04 23:42:58 +0000 |
---|---|---|
committer | Ciaran McCreesh <ciaranm@gentoo.org> | 2005-03-04 23:42:58 +0000 |
commit | e5019015693c29a383f0d01f2cddbaa14fb8358b (patch) | |
tree | 8128d0a12b3d7f3e737af58d79f64af12ac1e5ef /sys-process/dcron/files | |
parent | Marked ppc stable for bug #84017. (diff) | |
download | gentoo-2-e5019015693c29a383f0d01f2cddbaa14fb8358b.tar.gz gentoo-2-e5019015693c29a383f0d01f2cddbaa14fb8358b.tar.bz2 gentoo-2-e5019015693c29a383f0d01f2cddbaa14fb8358b.zip |
Move sys-apps/dcron -> sys-process/dcron
(Portage version: 2.0.51.19)
Diffstat (limited to 'sys-process/dcron/files')
-rw-r--r-- | sys-process/dcron/files/crontab | 23 | ||||
-rwxr-xr-x | sys-process/dcron/files/dcron | 25 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-2.7-Makefile-gentoo.diff | 25 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-2.9-Makefile.patch | 27 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-2.9-ldflags.patch | 24 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-2.9-pidfile.patch | 20 | ||||
-rwxr-xr-x | sys-process/dcron/files/dcron-r4 | 24 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron.logrotate | 3 | ||||
-rw-r--r-- | sys-process/dcron/files/digest-dcron-2.9-r2 | 1 | ||||
-rw-r--r-- | sys-process/dcron/files/digest-dcron-2.9-r4 | 1 |
10 files changed, 173 insertions, 0 deletions
diff --git a/sys-process/dcron/files/crontab b/sys-process/dcron/files/crontab new file mode 100644 index 000000000000..42b52f5203ee --- /dev/null +++ b/sys-process/dcron/files/crontab @@ -0,0 +1,23 @@ + +# /etc/crontab +# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/files/crontab,v 1.1 2005/03/04 23:42:58 ciaranm Exp $ + +# fcron || dcron: +# This is NOT the system crontab! fcron and dcron do not support a system crontab. +# to get /etc/cron.{hourly|daily|weekly|montly} working with fcron or dcron do +# crontab /etc/crontab +# as root. +# NOTE: This will REPLACE root's current crontab!! + + +# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly + +*/15 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons +0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly +0 3 * * * rm -f /var/spool/cron/lastrun/cron.daily +15 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly +30 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly + + + diff --git a/sys-process/dcron/files/dcron b/sys-process/dcron/files/dcron new file mode 100755 index 000000000000..65d89bf86eb9 --- /dev/null +++ b/sys-process/dcron/files/dcron @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/files/dcron,v 1.1 2005/03/04 23:42:58 ciaranm Exp $ + +depend() { + use logger + need clock hostname + provide cron +} + +start() { + ebegin "Starting dcron" + start-stop-daemon --start --quiet --exec /usr/sbin/crond \ + -- >>/var/log/cron.log 2>&1 + /usr/bin/pgrep -x -u 0 -P 1 crond > /var/run/cron.pid + eend $? +} + +stop() { + ebegin "Stopping dcron" + start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid \ + --exec /usr/sbin/crond + eend $? +} diff --git a/sys-process/dcron/files/dcron-2.7-Makefile-gentoo.diff b/sys-process/dcron/files/dcron-2.7-Makefile-gentoo.diff new file mode 100644 index 000000000000..0272185e550e --- /dev/null +++ b/sys-process/dcron/files/dcron-2.7-Makefile-gentoo.diff @@ -0,0 +1,25 @@ +--- Makefile.orig Tue Feb 27 01:13:24 2001 ++++ Makefile Tue Feb 27 16:32:34 2001 +@@ -2,7 +2,7 @@ + # + + CC = gcc +-CFLAGS = -O2 -Wall -Wstrict-prototypes ++CFLAGS += -Wall -Wstrict-prototypes + LIB = + SRCS = main.c subs.c database.c job.c + OBJS = main.o subs.o database.o job.o +@@ -15,11 +15,11 @@ + + crond: ${OBJS} + ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} +- strip crond ++ + + crontab: ${D_OBJS} + ${CC} ${CFLAGS} -o crontab ${D_OBJS} +- strip crontab ++ + + protos.h: ${SRCS} ${D_SRCS} + fgrep -h Prototype ${SRCS} ${D_SRCS} >protos.h diff --git a/sys-process/dcron/files/dcron-2.9-Makefile.patch b/sys-process/dcron/files/dcron-2.9-Makefile.patch new file mode 100644 index 000000000000..88b542042185 --- /dev/null +++ b/sys-process/dcron/files/dcron-2.9-Makefile.patch @@ -0,0 +1,27 @@ +--- Makefile ++++ Makefile +@@ -2,7 +2,8 @@ + # + + CC = gcc +-CFLAGS = -O2 -Wall -Wstrict-prototypes ++CFLAGS += -Wall -Wstrict-prototypes ++LDFLAGS += -Wl,-z,now + LIB = + SRCS = main.c subs.c database.c job.c + OBJS = main.o subs.o database.o job.o +@@ -14,12 +15,10 @@ + all: ${PROTOS} crond crontab + + crond: ${OBJS} +- ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} +- strip crond ++ ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ${LDFLAGS} + + crontab: ${D_OBJS} +- ${CC} ${CFLAGS} -o crontab ${D_OBJS} +- strip crontab ++ ${CC} ${CFLAGS} -o crontab ${D_OBJS} ${LDFLAGS} + + protos.h: ${SRCS} ${D_SRCS} + fgrep -h Prototype ${SRCS} ${D_SRCS} >protos.h diff --git a/sys-process/dcron/files/dcron-2.9-ldflags.patch b/sys-process/dcron/files/dcron-2.9-ldflags.patch new file mode 100644 index 000000000000..5eedfc8246c8 --- /dev/null +++ b/sys-process/dcron/files/dcron-2.9-ldflags.patch @@ -0,0 +1,24 @@ +--- Makefile.orig 2004-09-04 20:15:28.000000000 -0400 ++++ Makefile 2004-09-04 20:18:53.000000000 -0400 +@@ -3,6 +3,7 @@ + + CC = gcc + CFLAGS += -Wall -Wstrict-prototypes ++LDFLAGS += -Wl,-z,now + LIB = + SRCS = main.c subs.c database.c job.c + OBJS = main.o subs.o database.o job.o +@@ -14,11 +15,11 @@ + all: ${PROTOS} crond crontab + + crond: ${OBJS} +- ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ++ ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ${LDFLAGS} + + + crontab: ${D_OBJS} +- ${CC} ${CFLAGS} -o crontab ${D_OBJS} ++ ${CC} ${CFLAGS} -o crontab ${D_OBJS} ${LDFLAGS} + + + protos.h: ${SRCS} ${D_SRCS} diff --git a/sys-process/dcron/files/dcron-2.9-pidfile.patch b/sys-process/dcron/files/dcron-2.9-pidfile.patch new file mode 100644 index 000000000000..61b009f399ae --- /dev/null +++ b/sys-process/dcron/files/dcron-2.9-pidfile.patch @@ -0,0 +1,20 @@ +--- dcron/main.c.orig 2005-02-19 15:19:13.000000000 -0500 ++++ dcron/main.c 2005-02-19 15:27:28.000000000 -0500 +@@ -122,8 +122,15 @@ + perror("fork"); + exit(1); + } +- if (pid > 0) +- exit(0); ++ if (pid > 0) { ++ int fdpid; ++ char pidstr[24]; ++ fdpid = open("/var/run/cron.pid", O_WRONLY|O_CREAT|O_TRUNC, 0664); ++ sprintf(pidstr, "%d\n", pid); ++ write(fdpid, pidstr, strlen(pidstr)); ++ close(fdpid); ++ exit(0); ++ } + } + + /* diff --git a/sys-process/dcron/files/dcron-r4 b/sys-process/dcron/files/dcron-r4 new file mode 100755 index 000000000000..94072c8e5a51 --- /dev/null +++ b/sys-process/dcron/files/dcron-r4 @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/files/dcron-r4,v 1.1 2005/03/04 23:42:58 ciaranm Exp $ + +depend() { + use logger + need clock hostname + provide cron +} + +start() { + ebegin "Starting dcron" + /usr/sbin/crond >> /var/log/cron.log 2>&1 + eend $? +} + +stop() { + ebegin "Stopping dcron" + start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid + local ret=$? + rm -f /var/run/cron.pid + eend ${ret} +} diff --git a/sys-process/dcron/files/dcron.logrotate b/sys-process/dcron/files/dcron.logrotate new file mode 100644 index 000000000000..0577ad1186ae --- /dev/null +++ b/sys-process/dcron/files/dcron.logrotate @@ -0,0 +1,3 @@ +/var/log/cron.log { + copytruncate +} diff --git a/sys-process/dcron/files/digest-dcron-2.9-r2 b/sys-process/dcron/files/digest-dcron-2.9-r2 new file mode 100644 index 000000000000..bf4decff8ad3 --- /dev/null +++ b/sys-process/dcron/files/digest-dcron-2.9-r2 @@ -0,0 +1 @@ +MD5 120fb2ca3d91496b32df0ab01dcaec5e dcron29.tgz 15608 diff --git a/sys-process/dcron/files/digest-dcron-2.9-r4 b/sys-process/dcron/files/digest-dcron-2.9-r4 new file mode 100644 index 000000000000..bf4decff8ad3 --- /dev/null +++ b/sys-process/dcron/files/digest-dcron-2.9-r4 @@ -0,0 +1 @@ +MD5 120fb2ca3d91496b32df0ab01dcaec5e dcron29.tgz 15608 |