Commit Graph

121 Commits

Author SHA1 Message Date
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Ruslan Ermilov
31a06a8e6c Trim whitespace at EOL. 2004-06-04 19:24:21 +00:00
Ruslan Ermilov
b18b186e57 Markup nits. 2004-06-04 19:23:12 +00:00
Yaroslav Tykhiy
f5896baf9c Add two new options to cron(8), -J and -j. They allow to specify
the maximum amount of time jitter for root and other users, respectively.
Before starting a job, cron(8) will sleep a random number of seconds,
from 0 to the amount specified.  This can help to smooth down load spikes
when a lot of jobs are to start at the beginning of a particular minute
(e.g., the first minute of an hour.)

PR:		bin/66474
Submitted by:	Dmitry Morozovsky <marck <@> rinet.ru>
2004-05-16 19:29:33 +00:00
Tom Rhodes
aaa66740bf Eliminate hard sentence breaks.
General markup fixes (use the .Dq macro).
2004-03-04 19:12:27 +00:00
Tom Rhodes
8030199c71 Discuss the 'MAILTO' option.
PR:		58783
Submitted by:	Marc Silver <marcs@draenor.org>
2004-01-12 20:20:29 +00:00
Hartmut Brandt
b9ff618c3a Mention the fact that our crontab is not fully POSIX.2 conform, because
it doesn't allow the dangerous variant of calling it without any
argument.
2003-10-24 13:02:39 +00:00
Mike Silbersack
9be756b54b Fix a coredump that would occur when fdopen was unable to
return a valid fd.

PR:		49096
Submitted by:	demon
MFC after:	3 days
2003-06-19 20:04:51 +00:00
Thomas Quinot
6ced08bfa6 Allow inner whitespace in the right-hand side of an environment variable
assignment even if it is not quoted (as advertised by the man page).
This fixes a regression wrt RELENG_4 introduced in rev. 1.11.

Problem noted and patch tested by:	CHOI Junho <cjh@kr.FreeBSD.org>
Reviewed by:		roberto
2003-02-10 11:20:58 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Dima Dorfman
e9d295bf0b Actually use the exitstatus value that we maintain.
PR:		43562
Submitted by:	Marc Olzheim <marcolz@ilse.nl>
2002-10-01 22:59:11 +00:00
Tim J. Robbins
526b145c23 Never allow a user to use crontab if opening /var/cron/{allow,deny} fails
for any reason other than ENOENT (think resource limits). Close allow and
deny files before allowed() returns to stop the user's EDITOR being able to
read them.

Obtained from:	OpenBSD (partially)
2002-08-04 04:32:27 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Ollivier Robert
bb817201ed load_env(), the function that attempts to parse a crontab
line as an environment variable assignment, is broken
and not conformant to its description in the manual page.

I think it is worthwhile to have that fix in 4.6.

PR:             bin/38374
Submitted by:   Thomas Quinot <thomas@cuivre.fr.eu.org>
MFC after:      2 days
2002-05-23 13:16:30 +00:00
Ruslan Ermilov
423e9124d9 Mark all internal libraries with INTERNALLIB. 2002-05-13 11:24:03 +00:00
Philippe Charnier
7f94b8deee Use `The .Nm utility' 2002-04-20 12:27:18 +00:00
David Malone
879e98b647 Only remove the '\n' at the end of a line if there is one.
I missed this as part of the fix to the PR below.

PR:		31265
Submitted by:	Matthew D. Fuller <fullermd@over-yonder.net>
MFC after:	1 week
2002-04-10 22:01:37 +00:00
Giorgos Keramidas
cbbc2d594e Be a bit more verbose. "modtime" means nothing.
"modification time" is a lot better.

MFC after:      3 days
2002-03-24 00:56:38 +00:00
Giorgos Keramidas
4188e02521 Grammar fix: "When at least one of the fields .. matches ...".
MFC after:      3 days
2002-03-24 00:48:07 +00:00
David Malone
377a2e036f Describe the format of the allow and deny files. This is more-or-less
the patch Matthew submitted, but I broke the lines in a more FreeBSD
way and made one small wording change.

PR:		31265
Submitted by:	Matthew D. Fuller <fullermd@over-yonder.net>
MFC after:	3 weeks
2002-03-17 14:03:17 +00:00
Rob Braun
af71ab4f58 Make cron actually build without defining LOGIN_CAP.
Reviewed by: jkh
2002-02-06 02:00:07 +00:00
Ruslan Ermilov
3b1057ce33 Document the -x debugging option.
PR:		docs/33784
Submitted by:	Mike Makonnen <mike_makonnen@yahoo.com>
2002-01-16 14:12:02 +00:00
Mike Heffner
93cbb1d1cc Fix the @monthly and @weekly shortcuts so that they actually run
monthly and weekly, respectively. Also fix the @yearly shortcut so
that it doesn't execute daily during January. OpenBSD and NetBSD also
appear to have this bug.

PR:		bin/21152
2001-08-16 14:23:59 +00:00
Ruslan Ermilov
753d686d34 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
Ruslan Ermilov
c75526d5a0 mdoc(7) police: fixed the "new sentence" bogons. 2001-08-10 15:03:10 +00:00
Bill Fumerola
fd522d40d8 fix misspelling introduced in rev 1.14 (sames as -> same as) 2001-07-25 04:13:01 +00:00
David Nugent
4a9e66b57b Fix a possible NULL reference that would be triggered
by invalid input in /etc/crontab.

MFC after:	2 days
2001-07-20 06:46:48 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
b30f37abbb Remove an unused variable, and don't try to print a char[] using %d.
Submitted by:	Mark Peek <mark@whistle.com>
2001-07-18 11:49:45 +00:00
Dima Dorfman
5d3e1fcab1 free_entry(): Don't free e->envp if it's already NULL; likewise for
e->cmd.  free_entry() now does the right thing with
partially-initialized structures.

load_entry(): Don't call env_free() on e->envp throughout the routine
before jumping to eof; the free_entry() call at that label will take
care of it.  The previous behavior resulted in e->envp being free'd
twice (well, the second time would usually result in a crash, but
that's besides the point); once in load_entry(), and once in
free_entry() after the former called the latter.  Also note that the
check added to free_entry() (above) doesn't help, since e->envp wasn't
reset to NULL after env_free().

Submitted by:	Mark Peek <mark@whistle.com>
2001-07-18 11:48:00 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Peter Wemm
d952a14dbb Where is the pointy hat? Fix cut/paste error. (hey, it compiled! :-) 2001-06-16 03:16:52 +00:00
Dima Dorfman
fa0590b3d3 Plug two memory leaks: call login_close() after login_getclass(), and
use free_entry() instead of free() to free a struct _entry.

PR:		28108
Submitted by:	Mark Peek <mark@whistle.com>
2001-06-13 05:49:37 +00:00
Peter Wemm
8966f5046e Remove the 'DO NOT EDIT THIS FILE' crud that we spit out with 'crontab -l'.
Otherwise, "crontab -l > file; vi file; crontab file" adds an extra set
of "DO NOT EDIT" markers each and every time which is a bit silly.
2001-04-13 01:45:22 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Peter Wemm
c7517d5af9 Stop cron from shouting in the syslog. Use setproctitle() instead, since
smashing argv[0] doesn't have the intended effect of changing the ps(1)
output these days.

PR:		25850
2001-03-17 00:21:54 +00:00
Ruslan Ermilov
ac94747952 mdoc(7) police revision 1.15:
- replaced Oo/Oc enclosures with Op;
- removed hard sentence breaks;
- removed doubled space.
2001-03-09 11:02:01 +00:00
Sergey Babkin
404363cc17 The new version of the daylight time saving support. This time it works
for any change of the time zone offset from GMT. To enable use the
option -s.
2001-03-09 03:14:09 +00:00
Peter Wemm
1db78faf47 Properly detach at startup. We could be passing revoked fd's to
child processes or starting children with no fd 0 (stdin) at all etc.
This is currently breaking on hub.freebsd.org.
2001-03-07 10:38:46 +00:00
Jeroen Ruigrok van der Werven
1a6e52d0e9 Fix typo: seperate -> separate.
Seperate does not exist in the english language.
2001-02-06 11:21:58 +00:00
Ruslan Ermilov
610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Sergey Babkin
6548bd5646 Backed out the DST support changes. 2001-01-23 01:17:40 +00:00
Ruslan Ermilov
9c11143f2c mdoc(7) police: ``Ds'' is not certified (no macro with such name exist)
to be used as the -width parameter, it is provided solely for backwards
compatibility with old mdoc(7).  To make this work, mdocNG is forced to
provide a dummy ``Ds'' macro.
2001-01-22 10:27:07 +00:00
Sergey Babkin
be821963c1 Made the special handling of the daylight time switches optional,
enabled by the option "-s" (for dSt). This returned the default behavior
to its original form.

The new option name is not "-d" because that would cause associations with
"debug" and cron already has "-x" for debugging, so this would cause
confusion.
2001-01-22 01:54:51 +00:00
Sergey Babkin
08b2398e6d Added sensible handling of switch to and from daylight saving time
for the jobs that fall into the disappearing or duplicated time
interval.

PR:		bin/24494
2001-01-20 21:28:16 +00:00
Ruslan Ermilov
c5083414f8 mdoc(7) police: removed leading whitespaces that are not inside
Bd/Ed; these hardly degrade the quality of the produced output.
2001-01-19 14:15:40 +00:00
Ruslan Ermilov
1bfea903ed Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00