Commit Graph

213 Commits

Author SHA1 Message Date
Andrey A. Chernov
3d807d3be6 1) Add yet one optional field: pid file to send SIGHUP to if log rotated
(good thing for apache f.e.) This change is backward compatible with old
newsyslog.conf files.

2) Do not compress log if SIGHUP sending failed for some reason
(f.e. pid file deleted). Newcoming messages will be lost
otherwise.

3) Misc cleanup while I am here.
1997-05-04 01:53:53 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Mike Pritchard
c26d7157df Add a missing period so that the -n option is display properly
in the man page output.  Closes PR# 2831.

Submitted by:	 Marc Slemko <marcs@znep.com>
1997-02-28 07:33:37 +00:00
Peter Wemm
476602a9d0 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Mike Pritchard
747f0006ca Convert to mdoc format. 1996-12-21 21:57:21 +00:00
Jordan K. Hubbard
2252262f79 Doh! Actually read the patch I applied and see what it was *trying* to do,
then make it do that.
Error-of-my-ways-pointed-out-by: Bob Willcox <bob@luke.pmr.com>
1996-09-09 15:32:26 +00:00
Jordan K. Hubbard
8e1d470afc PR#2724 in NetBSD notes that newsyslog save log files even if the number
of copies to save is zero.  Incorporate suggested fix with some stylistic
cleanup to make the resulting code more readable.
Submitted-By: Kenneth Stailey <kstailey@dol-esa.gov>
1996-09-06 06:36:07 +00:00
Alexander Langer
c8d7d3dbe3 Added function prototypes and removed in-line prototypes of standard
functions such as malloc and time.
1996-06-08 23:32:10 +00:00
Alexander Langer
d442994ef5 Fix uninitialized variable that caused a core dump if /etc/newsyslog.conf
was empty.  Closes PR bin/1300.

Found by: Brian Tao <taob@io.org>
1996-06-07 16:27:28 +00:00
Thomas Graichen
9bf204a77e Submitted by: charnier@lirmm.fr (Philippe Charnier)
1) correct MAX_PID according to system definition.
2) replace fprintf(stderr,...)/perror/exit by 4.4 equivalence.
3) make strings enough larger so they can't overflow: MAXHOSTNAMELEN for
   host and MAXPATHLEN for filenames.
4) call execl with correct parameters (compress -> gzip).
1996-01-16 10:32:04 +00:00
Thomas Graichen
c6bf200d31 Obtained from: NetBSD (PR#1906)
removed date formatting glitch in newsyslog
1996-01-09 08:40:08 +00:00
Thomas Graichen
abf212be33 Obtained from: NetBSD
imported the newsyslog command from NetBSD - it make the "rotation" of
the logfiles much simpler (it is currently done by "hand" in the
/etc/[daily,weekly,monthly] scripts) - now it will be done by invoking
newsyslog every hour which is very customizable via a
/etc/newsyslog.conf file
1996-01-05 09:28:11 +00:00