%n cron %v 3.0pl1 %c * %l * %b * %d * %f * %t cron-3.0pl1.tgz %w Misc %% %setup patch -u -p1 <<'ENDPATCH' diff -ru2N cron-3.0pl1/Makefile cron-MCC/Makefile --- cron-3.0pl1/Makefile Tue Mar 1 02:39:12 1994 +++ cron-MCC/Makefile Sun Sep 22 20:52:38 1996 @@ -58,6 +58,6 @@ LIBS = #<> -#OPTIM = -O -OPTIM = -g +OPTIM = -O6 -fomit-frame-pointer +#OPTIM = -g #<> # (ATT untested) @@ -66,5 +66,5 @@ #COMPAT = -DBSD # (POSIX) -#COMPAT = -DPOSIX +COMPAT = -DPOSIX #<> LINTFLAGS = -hbxa $(INCLUDE) $(COMPAT) $(DEBUGGING) @@ -79,5 +79,5 @@ INSTALL = install #<> -LDFLAGS = +LDFLAGS = -Wl,-warn-common #################################### end configurable stuff @@ -113,5 +113,12 @@ $(CC) $(LDFLAGS) -o crontab $(CRONTAB_OBJ) $(LIBS) -install : all +install: all + install -s -m 555 cron /usr/sbin + install -s -m 4555 crontab /usr/bin + install -m 444 crontab.1 /usr/man/man1 + install -m 444 cron.8 /usr/man/man8 + install -m 444 crontab.5 /usr/man/man5 + (cd /usr/man;gzip -9f man1/crontab.1 man5/crontab.5 man8/cron.8) +dummy : all $(INSTALL) -c -m 111 -o root -s cron $(DESTSBIN)/ $(INSTALL) -c -m 4111 -o root -s crontab $(DESTBIN)/ diff -ru2N cron-3.0pl1/cron.8 cron-MCC/cron.8 --- cron-3.0pl1/cron.8 Tue Mar 1 02:39:16 1994 +++ cron-MCC/cron.8 Sun Sep 22 20:40:19 1996 @@ -25,15 +25,22 @@ cron .SH DESCRIPTION -.I Cron -should be started from /etc/rc or /etc/rc.local. It will return immediately, -so you don't need to start it with '&'. +.I cron +is started automatically from /etc/init.d on entering multi-user +runlevels. .PP -.I Cron -searches /var/cron/tabs for crontab files which are named after accounts in -/etc/passwd; crontabs found are loaded into memory. -.I Cron -also searches for /etc/crontab which is in a different format (see +.I cron +searches its spool area (/var/cron/crontabs) for crontab +files (which are named after accounts in +/etc/passwd); crontabs found are loaded into memory. Note that +crontabs in this directory should not be accessed directly - +the +.I crontab +command should be used to access and update them. + +.I cron +also reads /etc/crontab, which is in a slightly different format (see .IR crontab(5)). -.I Cron + +.I cron then wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute. When executing @@ -52,5 +59,5 @@ .I cron need not be restarted whenever a crontab file is modified. Note that the -.IR Crontab (1) +.IR crontab (1) command updates the modtime of the spool directory whenever it changes a crontab. diff -ru2N cron-3.0pl1/crontab.1 cron-MCC/crontab.1 --- cron-3.0pl1/crontab.1 Tue Mar 1 02:39:17 1994 +++ cron-MCC/crontab.1 Sun Sep 22 20:42:17 1996 @@ -27,5 +27,5 @@ crontab [ -u user ] { -l | -r | -e } .SH DESCRIPTION -.I Crontab +.I crontab is the program used to install, deinstall or list the tables used to drive the diff -ru2N cron-3.0pl1/crontab.5 cron-MCC/crontab.5 --- cron-3.0pl1/crontab.5 Tue Mar 1 02:41:27 1994 +++ cron-MCC/crontab.5 Mon Jun 19 01:36:06 1995 @@ -35,5 +35,5 @@ .PP Blank lines and leading spaces and tabs are ignored. Lines whose first -non-space character is a pound-sign (#) are comments, and are ignored. +non-space character is a hash-sign (#) are comments, and are ignored. Note that comments are not allowed on the same line as cron commands, since they will be taken to be part of the command. Similarly, comments are not diff -ru2N cron-3.0pl1/database.c cron-MCC/database.c --- cron-3.0pl1/database.c Tue Mar 1 02:39:18 1994 +++ cron-MCC/database.c Wed Sep 21 12:05:29 1994 @@ -207,5 +207,7 @@ /* file doesn't have a user in passwd file. */ - log_it(fname, getpid(), "ORPHAN", "no passwd entry"); + if (strncmp(fname, "tmp.", 4)) { + log_it(fname, getpid(), "ORPHAN", "no passwd entry"); + } goto next_crontab; } diff -ru2N cron-3.0pl1/do_command.c cron-MCC/do_command.c --- cron-3.0pl1/do_command.c Tue Mar 1 02:39:29 1994 +++ cron-MCC/do_command.c Thu Sep 21 01:47:58 1995 @@ -208,5 +208,5 @@ */ setgid(e->gid); -# if defined(BSD) +# if defined(BSD) || defined(POSIX) initgroups(env_get("LOGNAME", e->envp), e->gid); # endif diff -ru2N cron-3.0pl1/pathnames.h cron-MCC/pathnames.h --- cron-3.0pl1/pathnames.h Tue Mar 1 02:39:19 1994 +++ cron-MCC/pathnames.h Sun Sep 22 20:46:27 1996 @@ -40,5 +40,5 @@ * didn't exist last time around...) */ -#define SPOOL_DIR "tabs" +#define SPOOL_DIR "crontabs" /* undefining these turns off their features. note @@ -50,5 +50,5 @@ #define ALLOW_FILE "allow" /*-*/ #define DENY_FILE "deny" /*-*/ -#define LOG_FILE "log" /*-*/ +/* #define LOG_FILE "log" -*/ /* where should the daemon stick its PID? @@ -59,5 +59,5 @@ # define PIDDIR "/etc/" #endif -#define PIDFILE "%scron.pid" +#define PIDFILE "%scrond.pid" /* 4.3BSD-style crontab */ ENDPATCH make * make install %%