summaryrefslogtreecommitdiffstats
path: root/source/a/dcron
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/dcron')
-rw-r--r--source/a/dcron/dcron-2.3.3.crontab.diff419
-rw-r--r--source/a/dcron/dcron-2.3.3.diff40
-rw-r--r--source/a/dcron/dcron-2.3.3.diff2477
-rw-r--r--source/a/dcron/dcron-2.3.3.diff311
-rw-r--r--source/a/dcron/dcron-2.3.3.lsm17
-rw-r--r--source/a/dcron/dcron-2.3.3.version.diff11
-rwxr-xr-xsource/a/dcron/dcron.SlackBuild76
-rw-r--r--source/a/dcron/dcron.fork.diff11
-rw-r--r--source/a/dcron/dcron.tmpdir.diff11
-rw-r--r--source/a/dcron/run-parts49
-rw-r--r--source/a/dcron/run-parts.836
-rw-r--r--source/a/dcron/slack-desc19
12 files changed, 777 insertions, 0 deletions
diff --git a/source/a/dcron/dcron-2.3.3.crontab.diff4 b/source/a/dcron/dcron-2.3.3.crontab.diff4
new file mode 100644
index 000000000..30d0501a0
--- /dev/null
+++ b/source/a/dcron/dcron-2.3.3.crontab.diff4
@@ -0,0 +1,19 @@
+--- ./crontab.c.orig Wed Feb 20 14:31:32 2002
++++ ./crontab.c Wed Feb 20 14:33:13 2002
+@@ -197,14 +197,14 @@
+ int n;
+
+ snprintf(path, sizeof(path), "%s.new", pas->pw_name);
+- if ((fd = open(path, O_CREAT|O_TRUNC|O_EXCL|O_APPEND|O_WRONLY, 0600)) >= 0) {
++ if ((fd = open(path, O_CREAT|O_TRUNC|O_APPEND|O_WRONLY, 0600)) >= 0) {
+ while ((n = read(repFd, buf, sizeof(buf))) > 0) {
+ write(fd, buf, n);
+ }
+ close(fd);
+ rename(path, pas->pw_name);
+ } else {
+- fprintf(stderr, "unable to create %s/%s\n", CDir, buf);
++ fprintf(stderr, "unable to create %s/%s\n", CDir, path);
+ }
+ close(repFd);
+ }
diff --git a/source/a/dcron/dcron-2.3.3.diff b/source/a/dcron/dcron-2.3.3.diff
new file mode 100644
index 000000000..22806de3e
--- /dev/null
+++ b/source/a/dcron/dcron-2.3.3.diff
@@ -0,0 +1,40 @@
+--- ./defs.h.orig Fri Sep 5 14:44:32 1997
++++ ./defs.h Thu Aug 26 16:56:10 1999
+@@ -29,7 +29,7 @@
+ #define CRONTABS "/var/spool/cron/crontabs"
+ #endif
+ #ifndef TMPDIR
+-#define TMPDIR "/tmp"
++#define TMPDIR "/var/spool/cron"
+ #endif
+ #ifndef OPEN_MAX
+ #define OPEN_MAX 256
+--- ./subs.c.orig Mon Feb 16 13:35:10 1998
++++ ./subs.c Thu Aug 26 16:57:21 1999
+@@ -15,7 +15,7 @@
+ Prototype int ChangeUser(const char *user, short dochdir);
+ Prototype void vlog(int level, int fd, const char *ctl, va_list va);
+ Prototype int slog(char *buf, size_t sz, const char *ctl, va_list va, short useDate);
+-Prototype char *strdup(const char *);
++Prototype char *xx_strdup(const char *);
+
+ void
+ log9(const char *ctl, ...)
+@@ -80,7 +80,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), sz - strlen(buf), ctl, va);
+ return(strlen(buf));
+ }
+@@ -132,7 +132,7 @@
+ }
+
+ char *
+-strdup(const char *str)
++xx_strdup(const char *str)
+ {
+ char *ptr = malloc(strlen(str) + 1);
+
diff --git a/source/a/dcron/dcron-2.3.3.diff2 b/source/a/dcron/dcron-2.3.3.diff2
new file mode 100644
index 000000000..8eb8242c5
--- /dev/null
+++ b/source/a/dcron/dcron-2.3.3.diff2
@@ -0,0 +1,477 @@
+--- ./CHANGES:1.1 Fri Jan 7 18:15:59 2000
++++ ./CHANGES Thu Apr 20 12:10:36 2000
+@@ -1,3 +1,15 @@
++20/03/00 - TEMHOTA <temnota@kmv.ru>
++ Adding SIGHUP signal handler. crond die when init send to it SIGHUP.
++ Rewrtited all loging code. Added logging through syslog and normal
++ logging to file.
++
++ Technical details:
++ + logging through syslog used facility LOG_CRON
++ + log_err - now *always* write message to logger (if selected logging
++ through syslog - message send as LOG_ERR).
++ + log9 - sends message hrough syslog loglevel LOG_WARNING
++ + for all other log levels - default syslog loglevel LOG_NOTICE
++
+ 02/16/98 - Jordan Mendelson (jordy@wserv.com)
+
+ Numerous people have reported a problem with logging. I'm sorry
+--- ./Makefile:1.1 Fri Jan 7 18:15:59 2000
++++ ./Makefile Thu Apr 20 12:24:40 2000
+@@ -27,7 +27,7 @@
+ rm -f crond crontab
+
+ cleano:
+- rm -f *.o dcron.tgz $(PROTOS)
++ rm -f *.o dcron.tgz $(PROTOS) *~
+
+ install: crond crontab
+ install -o root -g root -m 0755 crond /usr/sbin
+--- ./crontab.c:1.1 Fri Jan 7 18:15:59 2000
++++ ./crontab.c Sun Mar 19 15:03:36 2000
+@@ -15,6 +15,9 @@
+ char *CDir = CRONTABS;
+ int UserId;
+ short LogLevel = 9;
++short DebugOpt = 0;
++short LoggerOpt = 0;
++char *LogFile = LOG_FILE;
+
+ void EditFile(const char *user, const char *file);
+ int GetReplaceStream(const char *user, const char *file);
+@@ -136,7 +139,7 @@
+ */
+
+ if (chdir(CDir) < 0) {
+- fprintf(stderr, "cannot change diir to %s: %s\n", CDir, strerror(errno));
++ fprintf(stderr, "cannot change dir to %s: %s\n", CDir, strerror(errno));
+ exit(1);
+ }
+
+--- ./defs.h:1.1 Fri Jan 7 18:15:59 2000
++++ ./defs.h Sun Mar 19 15:03:36 2000
+@@ -17,6 +17,9 @@
+ #include <pwd.h>
+ #include <unistd.h>
+ #include <grp.h>
++#include <syslog.h>
++#include <signal.h>
++#include <getopt.h>
+ #include <sys/ioctl.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+@@ -30,6 +33,9 @@
+ #endif
+ #ifndef TMPDIR
+ #define TMPDIR "/var/spool/cron"
++#endif
++#ifndef LOG_FILE
++#define LOG_FILE "/var/log/cron"
+ #endif
+ #ifndef OPEN_MAX
+ #define OPEN_MAX 256
+--- ./job.c:1.1 Fri Jan 7 18:15:59 2000
++++ ./job.c Thu Apr 20 12:10:36 2000
+@@ -16,7 +16,7 @@
+ {
+ char mailFile[128];
+ int mailFd;
+-
++
+ line->cl_Pid = 0;
+ line->cl_MailFlag = 0;
+
+@@ -57,14 +57,6 @@
+ log(5, "Child Running %s\n", line->cl_Shell);
+
+ /*
+- * Setup close-on-exec descriptor in case exec fails
+- */
+-
+- dup2(2, 8);
+- fcntl(8, F_SETFD, 1);
+- fclose(stderr);
+-
+- /*
+ * stdin is already /dev/null, setup stdout and stderr
+ */
+
+@@ -73,13 +65,13 @@
+ dup2(mailFd, 2);
+ close(mailFd);
+ } else {
+- logfd(8, "unable to create mail file user %s file %s, output to /dev/null\n",
++ log_err("unable to create mail file user %s file %s, output to /dev/null\n",
+ file->cf_User,
+ mailFile
+ );
+ }
+ execl("/bin/sh", "/bin/sh", "-c", line->cl_Shell, NULL, NULL);
+- logfd(8, "unable to exec, user %s cmd /bin/sh -c %s\n",
++ log_err("unable to exec, user %s cmd /bin/sh -c %s\n",
+ file->cf_User,
+ line->cl_Shell
+ );
+@@ -89,7 +81,7 @@
+ /*
+ * PARENT, FORK FAILED
+ */
+- log9("couldn't fork, user %s\n", file->cf_User);
++ log_err("couldn't fork, user %s\n", file->cf_User);
+ line->cl_Pid = 0;
+ remove(mailFile);
+ } else {
+@@ -158,6 +150,7 @@
+ if (mailFd < 0) {
+ return;
+ }
++
+ if (fstat(mailFd, &sbuf) < 0 ||
+ sbuf.st_uid != DaemonUid ||
+ sbuf.st_nlink != 0 ||
+@@ -182,15 +175,6 @@
+ exit(0);
+
+ /*
+- * create close-on-exec log descriptor in case exec fails
+- */
+-
+- dup2(2, 8);
+- fcntl(8, F_SETFD, 1);
+-
+- fclose(stderr);
+-
+- /*
+ * run sendmail with mail file as standard input, only if
+ * mail file exists!
+ */
+@@ -200,7 +184,7 @@
+ close(mailFd);
+
+ execl(SENDMAIL, SENDMAIL, SENDMAIL_ARGS, NULL, NULL);
+- logfd(8, "unable to exec %s %s, user %s, output to sink null",
++ log_err("unable to exec %s %s, user %s, output to sink null",
+ SENDMAIL,
+ SENDMAIL_ARGS,
+ file->cf_User
+@@ -210,7 +194,7 @@
+ /*
+ * PARENT, FORK FAILED
+ */
+- log9("unable to fork, user %s", file->cf_User);
++ log_err("unable to fork, user %s", file->cf_User);
+ line->cl_Pid = 0;
+ } else {
+ /*
+--- ./main.c:1.1 Fri Jan 7 18:15:59 2000
++++ ./main.c Sun Mar 19 15:03:36 2000
+@@ -15,14 +15,18 @@
+ Prototype short DebugOpt;
+ Prototype short LogLevel;
+ Prototype short ForegroundOpt;
+-Prototype char *CDir;
+-Prototype int DaemonUid;
++Prototype short LoggerOpt;
++Prototype char *CDir;
++Prototype char *LogFile;
++Prototype uid_t DaemonUid;
+
+ short DebugOpt;
+ short LogLevel = 8;
+-short ForegroundOpt;
++short ForegroundOpt = 0;
++short LoggerOpt;
+ char *CDir = CRONTABS;
+-int DaemonUid;
++char *LogFile = LOG_FILE;
++uid_t DaemonUid;
+
+ int
+ main(int ac, char **av)
+@@ -35,48 +39,49 @@
+
+ DaemonUid = getuid();
+
+- for (i = 1; i < ac; ++i) {
+- char *ptr = av[i];
++ opterr = 0; /* disable getopt 'errors' message.*/
+
+- if (*ptr == '-') {
+- ptr += 2;
+-
+- switch(ptr[-1]) {
++ while ((i = getopt(ac,av,"d:l:L:fbSc:")) != EOF){
++
++ switch (i){
+ case 'l':
+- LogLevel = (*ptr) ? strtol(ptr, NULL, 0) : 1;
+- continue;
++ LogLevel = atoi(optarg);
++ break;
+ case 'd':
+- DebugOpt = (*ptr) ? strtol(ptr, NULL, 0) : 1;
++ DebugOpt = atoi(optarg);
+ LogLevel = 0;
+ /* fall through */
++ break;
+ case 'f':
+ ForegroundOpt = 1;
+- continue;
++ break;
+ case 'b':
+ ForegroundOpt = 0;
+- continue;
++ break;
++ case 'S': /* select logging to syslog */
++ LoggerOpt = 0;
++ break;
++ case 'L': /* select internal file logger */
++ LoggerOpt = 1;
++ if (*optarg != 0) LogFile = optarg;
++ break;
+ case 'c':
+- CDir = (*ptr) ? ptr : av[++i];
+- continue;
++ if (*optarg != 0) CDir = optarg;
++ break;
+ default:
++ /*
++ * parse error
++ */
++ printf("dcron " VERSION "\n");
++ printf("dcron -d [#] -l [#] -S -L logfile -f -b -c dir\n");
++ printf("-d num\tdebug level\n-l num\tlog level (8 - default)\n-S\tlog to syslod (defualt)\n");
++ printf("-L file\tlog to file\n-f\trun in fordeground\n");
++ printf("-b\trun in background (default)\n-c dir\tworking dir\n");
++ exit(1);
+ break;
+- }
+- }
+- break; /* error */
+- }
+-
+- /*
+- * check for parse error
+- */
+-
+- if (i != ac) {
+- if (i > ac)
+- puts("expected argument for option");
+- printf("dcron " VERSION "\n");
+- printf("dcron -d[#] -l[#] -f -b -c dir\n");
+- exit(1);
++ }
+ }
+-
++
+ /*
+ * change directory
+ */
+@@ -87,14 +92,15 @@
+ }
+
+ /*
+- * close stdin and stdout (stderr normally redirected by caller).
+- * close unused descriptors
++ * close stdin and stdout, stderr.
++ * close unused descriptors - don't need.
+ * optional detach from controlling terminal
+ */
+
+ fclose(stdin);
+ fclose(stdout);
+-
++ fclose(stderr);
++
+ i = open("/dev/null", O_RDWR);
+ if (i < 0) {
+ perror("open: /dev/null:");
+@@ -102,15 +108,14 @@
+ }
+ dup2(i, 0);
+ dup2(i, 1);
++ dup2(i, 2);
+
+- for (i = 3; i < OPEN_MAX; ++i) {
+- close(i);
+- }
+-
+ if (ForegroundOpt == 0) {
+ int fd;
+ int pid;
+-
++ if (setsid() < 0)
++ perror("setsid");
++
+ if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
+ ioctl(fd, TIOCNOTTY, 0);
+ close(fd);
+@@ -125,13 +130,17 @@
+ if (pid > 0)
+ exit(0);
+ }
+-
++
++ (void)startlogger(); /* need if syslog mode selected */
++ (void)initsignals(); /* set some signal handlers */
++
+ /*
+ * main loop - synchronize to 1 second after the minute, minimum sleep
+ * of 1 second.
+ */
++
++ log(9,"%s " VERSION " dillon, started, log level %d\n", av[0], LogLevel);
+
+- log9("%s " VERSION " dillon, started\n", av[0]);
+ SynchronizeDir(".");
+
+ {
+--- ./subs.c:1.1 Fri Jan 7 18:15:59 2000
++++ ./subs.c Sun Mar 19 15:03:36 2000
+@@ -10,43 +10,62 @@
+
+ Prototype void log(int level, const char *ctl, ...);
+ Prototype void log9(const char *ctl, ...);
+-Prototype void logfd(int fd, const char *ctl, ...);
++Prototype void log_err(const char *ctl, ...);
+ Prototype void fdprintf(int fd, const char *ctl, ...);
+-Prototype int ChangeUser(const char *user, short dochdir);
+-Prototype void vlog(int level, int fd, const char *ctl, va_list va);
+-Prototype int slog(char *buf, size_t sz, const char *ctl, va_list va, short useDate);
++Prototype void vlog(int level, int MLOG_LEVEL, const char *ctl, va_list va);
++Prototype int ChangeUser(const char *user, short dochdir);
+ Prototype char *xx_strdup(const char *);
++Prototype void startlogger(void);
++Prototype void initsignals(void);
+
++/*
++ set log_level=9 and log messages
++*/
++
+ void
+ log9(const char *ctl, ...)
+ {
+ va_list va;
+
+ va_start(va, ctl);
+- vlog(9, 2, ctl, va);
++ vlog(9, LOG_WARNING, ctl, va);
+ va_end(va);
+ }
+
++/*
++ normal logger call point.
++*/
++
+ void
+ log(int level, const char *ctl, ...)
+ {
+ va_list va;
+
+ va_start(va, ctl);
+- vlog(level, 2, ctl, va);
++ vlog(level, LOG_NOTICE, ctl, va);
+ va_end(va);
+ }
+
++/*
++ Original: void
++ logfd(int fd, const char *ctl, ...)
++ Updated to: log_error (used by jobs.c)
++*/
++
+ void
+-logfd(int fd, const char *ctl, ...)
++log_err(const char *ctl, ...)
+ {
+ va_list va;
+
+ va_start(va, ctl);
+- vlog(9, fd, ctl, va);
++ vlog(20, LOG_ERR, ctl, va);
+ va_end(va);
+ }
+
++/*
++ used by jobs.c (write to temp file..)
++*/
++
+ void
+ fdprintf(int fd, const char *ctl, ...)
+ {
+@@ -60,32 +79,28 @@
+ }
+
+ void
+-vlog(int level, int fd, const char *ctl, va_list va)
++vlog(int level, int MLOG_LEVEL, const char *ctl, va_list va)
+ {
+ char buf[1024];
+- short n;
+- static short useDate = 1;
++ int logfd;
+
+ if (level >= LogLevel) {
+- write(fd, buf, n = slog(buf, sizeof(buf), ctl, va, useDate));
+- useDate = (n && buf[n-1] == '\n');
++
++ vsnprintf(buf,sizeof(buf), ctl, va);
++ if (DebugOpt) fprintf(stderr,"%s",buf);
++ else
++ if (LoggerOpt == 0) syslog(MLOG_LEVEL, "%s",buf );
++ else {
++ if ((logfd = open(LogFile,O_WRONLY|O_CREAT|O_APPEND,600)) >= 0){
++ write(logfd, buf, strlen(buf));
++ close(logfd);
++ } else
++ fprintf(stderr,"Can't open log file. Err: %s",strerror(errno));
++ }
+ }
+ }
+
+ int
+-slog(char *buf, size_t sz, const char *ctl, va_list va, short useDate)
+-{
+- time_t t = time(NULL);
+- struct tm *tp = localtime(&t);
+-
+- buf[0] = 0;
+- if (useDate)
+- strftime(buf, 128, "%d-%b-%Y %H:%M ", tp);
+- vsnprintf(buf + strlen(buf), sz - strlen(buf), ctl, va);
+- return(strlen(buf));
+-}
+-
+-int
+ ChangeUser(const char *user, short dochdir)
+ {
+ struct passwd *pas;
+@@ -141,3 +156,28 @@
+ return(ptr);
+ }
+
++
++void
++startlogger(void){
++int logfd;
++
++ if (LoggerOpt == 0)
++ openlog("crond",LOG_CONS|LOG_PID,LOG_CRON);
++
++ else { /* test logfile */
++ if ((logfd = open(LogFile,O_WRONLY|O_CREAT|O_APPEND,600)) >= 0)
++ close(logfd);
++ else
++ printf("Failed to open log file '%s' reason: %s",LogFile,strerror(errno));
++ }
++}
++
++
++void
++initsignals(void){
++
++ signal(SIGHUP,SIG_IGN); /* hmm.. but, if kill -HUP original
++ * version - his died. ;(
++ */
++
++}
diff --git a/source/a/dcron/dcron-2.3.3.diff3 b/source/a/dcron/dcron-2.3.3.diff3
new file mode 100644
index 000000000..25c72fc96
--- /dev/null
+++ b/source/a/dcron/dcron-2.3.3.diff3
@@ -0,0 +1,11 @@
+--- ./defs.h.orig Wed May 30 14:13:05 2001
++++ ./defs.h Wed May 30 14:13:13 2001
+@@ -41,7 +41,7 @@
+ #define OPEN_MAX 256
+ #endif
+ #ifndef SENDMAIL
+-#define SENDMAIL "/usr/lib/sendmail"
++#define SENDMAIL "/usr/sbin/sendmail"
+ #endif
+ #ifndef SENDMAIL_ARGS
+ #define SENDMAIL_ARGS "-t", "-oem", "-i"
diff --git a/source/a/dcron/dcron-2.3.3.lsm b/source/a/dcron/dcron-2.3.3.lsm
new file mode 100644
index 000000000..5c161b50a
--- /dev/null
+++ b/source/a/dcron/dcron-2.3.3.lsm
@@ -0,0 +1,17 @@
+Begin3
+Title: DCron - yet another cron
+Version: 2.3.3
+Entered-date: 17Feb98
+Description: A multi-user cron written from scratch by the author,
+ similar to vixie-cron but with significant differences.
+ Attention paid less to feature creep and more to usability
+ and reliability
+Keywords: cron crontab dcron
+Author: dillon@apollo.west.oic.com (Matthew Dillon)
+Maintained-by: dillon@apollo.west.oic.com (Matthew Dillon)
+Primary-site: sunsite.unc.edu /pub/Linux/system/daemons/cron
+Alternate-site:
+Original-site:
+Platforms:
+Copying-policy: GPL
+End
diff --git a/source/a/dcron/dcron-2.3.3.version.diff b/source/a/dcron/dcron-2.3.3.version.diff
new file mode 100644
index 000000000..1b65a0c98
--- /dev/null
+++ b/source/a/dcron/dcron-2.3.3.version.diff
@@ -0,0 +1,11 @@
+--- ./defs.h.orig Tue Apr 9 01:07:07 2002
++++ ./defs.h Tue Apr 9 01:07:15 2002
+@@ -51,7 +51,7 @@
+ #endif
+
+
+-#define VERSION "2.3.2"
++#define VERSION "2.3.3"
+
+ typedef struct CronFile {
+ struct CronFile *cf_Next;
diff --git a/source/a/dcron/dcron.SlackBuild b/source/a/dcron/dcron.SlackBuild
new file mode 100755
index 000000000..c9bb62ff3
--- /dev/null
+++ b/source/a/dcron/dcron.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+VERSION=2.3.3
+ARCH=${ARCH:-x86_64}
+BUILD=${BUILD:-6}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-dcron
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# Explode the package framework:
+cd $PKG
+explodepkg $CWD/_dcron.tar.gz
+
+cd $TMP
+rm -rf dcron-$VERSION
+tar xzvf $CWD/dcron-$VERSION.tar.gz
+cd dcron-$VERSION
+mkdir -p $PKG/usr/doc/dcron-$VERSION
+cp -a CHANGES README dcron-$VERSION.lsm $PKG/usr/doc/dcron-2.3.3
+chown root:root $PKG/usr/doc/dcron-$VERSION/*
+chmod 644 $PKG/usr/doc/dcron-$VERSION/*
+zcat $CWD/dcron-$VERSION.diff.gz | patch -p1 -E --verbose --backup || exit
+# Added signal handling/logging patch from TEMHOTA <temnota@kmv.ru>:
+zcat $CWD/dcron-$VERSION.diff2.gz | patch -p1 -E --verbose --backup || exit
+# Use /usr/sbin/sendmail, not /usr/lib/sendmail. Fixes cron working
+# with Postfix. Suggested by Big Brother.
+zcat $CWD/dcron-$VERSION.diff3.gz | patch -p1 -E --verbose --backup || exit
+# Fix problem where user creates /var/spool/cron/crontabs/<user>.new
+# using 'crontab -', exits with control-c, and then crontab refuses to
+# overwrite the junk file:
+zcat $CWD/dcron-$VERSION.crontab.diff4.gz | patch -p1 -E --verbose --backup || exit
+# Dcron reports wrong version:
+zcat $CWD/dcron-2.3.3.version.diff.gz | patch -p1 || exit
+# Keep dcron from improperly forking in some circumstances.
+# Thanks to Henrik Carlqvist for the patch.
+zcat $CWD/dcron.fork.diff.gz | patch -p1
+make
+strip crond crontab
+cat crond > $PKG/usr/sbin/crond
+cat crontab > $PKG/usr/bin/crontab
+zcat $CWD/run-parts.gz > $PKG/usr/bin/run-parts
+cat crontab.1 | gzip -9c > $PKG/usr/man/man1/crontab.1.gz
+cat crond.8 | gzip -9c > $PKG/usr/man/man8/crond.8.gz
+cat $CWD/run-parts.8.gz > $PKG/usr/man/man8/run-parts.8.gz
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/dcron-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/a/dcron/dcron.fork.diff b/source/a/dcron/dcron.fork.diff
new file mode 100644
index 000000000..b3aefc054
--- /dev/null
+++ b/source/a/dcron/dcron.fork.diff
@@ -0,0 +1,11 @@
+--- ./job.c.orig 2005-09-11 16:36:43.000000000 -0700
++++ ./job.c 2005-09-11 16:37:51.000000000 -0700
+@@ -51,7 +51,7 @@
+ */
+
+ if (ChangeUser(file->cf_User, 1) < 0)
+- return;
++ exit(0);
+
+ if (DebugOpt)
+ log(5, "Child Running %s\n", line->cl_Shell);
diff --git a/source/a/dcron/dcron.tmpdir.diff b/source/a/dcron/dcron.tmpdir.diff
new file mode 100644
index 000000000..3946fedeb
--- /dev/null
+++ b/source/a/dcron/dcron.tmpdir.diff
@@ -0,0 +1,11 @@
+--- defs.h.orig Mon May 2 10:27:40 1994
++++ defs.h Sun Apr 4 22:09:00 1999
+@@ -29,7 +29,7 @@
+ #define CRONTABS "/var/spool/cron/crontabs"
+ #endif
+ #ifndef TMPDIR
+-#define TMPDIR "/tmp"
++#define TMPDIR "/var/spool/cron"
+ #endif
+ #ifndef OPEN_MAX
+ #define OPEN_MAX 256
diff --git a/source/a/dcron/run-parts b/source/a/dcron/run-parts
new file mode 100644
index 000000000..dd6b59b3e
--- /dev/null
+++ b/source/a/dcron/run-parts
@@ -0,0 +1,49 @@
+#!/bin/sh
+# run-parts: Runs all the scripts found in a directory.
+
+# keep going when something fails
+set +e
+
+if [ $# -lt 1 ]; then
+ echo "Usage: run-parts <directory>"
+ exit 1
+fi
+
+if [ ! -d $1 ]; then
+ echo "Not a directory: $1"
+ echo "Usage: run-parts <directory>"
+ exit 1
+fi
+
+# There are several types of files that we would like to
+# ignore automatically, as they are likely to be backups
+# of other scripts:
+IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
+
+# Main loop:
+for SCRIPT in $1/* ; do
+ # If this is not a regular file, skip it:
+ if [ ! -f $SCRIPT ]; then
+ continue
+ fi
+ # Determine if this file should be skipped by suffix:
+ SKIP=false
+ for SUFFIX in $IGNORE_SUFFIXES ; do
+ if [ ! "`basename $SCRIPT $SUFFIX`" = "`basename $SCRIPT`" ]; then
+ SKIP=true
+ break
+ fi
+ done
+ if [ "$SKIP" = "true" ]; then
+ continue
+ fi
+ # If we've made it this far, then run the script if it's executable:
+ if [ -x $SCRIPT ]; then
+ echo "$SCRIPT:"
+ echo
+ $SCRIPT 2>&1
+ echo
+ fi
+done
+
+exit 0
diff --git a/source/a/dcron/run-parts.8 b/source/a/dcron/run-parts.8
new file mode 100644
index 000000000..2d5e5f6ad
--- /dev/null
+++ b/source/a/dcron/run-parts.8
@@ -0,0 +1,36 @@
+.\" -*- nroff -*-
+.ds g \" empty
+.ds G \" empty
+.\" Like TP, but if specified indent is more than half
+.\" the current line-length - indent, use the default indent.
+.de Tp
+.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
+.el .TP "\\$1"
+..
+.TH RUN-PARTS 8 "14 Apr 2002" "Slackware Version 8.1.0
+.SH NAME
+run-parts \- run scripts found in a directory
+.SH SYNOPSIS
+.B run-parts <directory>
+.LP
+.SH DESCRIPTION
+.B run-parts
+is a utility that will run scripts that are found in a directory. For example,
+it might be useful to create an /etc/cron.daily directory and put scripts in
+there for daily cron jobs. Then
+.B run-parts
+can be called once a day from root's crontab to run all the scripts found in
+/etc/cron.daily:
+
+40 4 * * * run-parts /etc/cron.daily
+
+.B run-parts
+automatically skips files with certain suffixes that are generally associated
+with backup or extra files. Any file that ends in one of these will be silently
+ignored: ~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp
+.SH AUTHOR
+Patrick J. Volkerding <volkerdi@slackware.com>, with ideas borrowed from the
+Red Hat and Debian versions of this utility.
+.SH "SEE ALSO"
+.BR crond(8),
+.BR crontab(8).
diff --git a/source/a/dcron/slack-desc b/source/a/dcron/slack-desc
new file mode 100644
index 000000000..d56e60871
--- /dev/null
+++ b/source/a/dcron/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+dcron: dcron (Dillon's Cron daemon)
+dcron:
+dcron: The cron daemon runs in the background and executes tasks on behalf of
+dcron: users at the appropriate time. Many timed system tasks are started
+dcron: with cron, such as the nightly indexing with updatedb.
+dcron:
+dcron: dcron was written entirely from scratch by Matthew Dillon.
+dcron:
+dcron:
+dcron:
+dcron: