Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 1998 05:33:46 -0200 (EDT)
From:      Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>
To:        hackers@FreeBSD.ORG
Subject:   logrotate, a proposal
Message-ID:  <199802100733.FAA03915@gaia.coppe.ufrj.br>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi,

  I could not sleep, so I went hacking.  :)

  I have modified newsyslog.c to create the logrotate.  The sources
are attached.  If some commiter think it has enough quality to be
integrated, please do so.

  I tried not to make many changes to the original sources.  In fact,
the rotate function is just the same (except for minor bugs) as the
one in newsyslog.c.  Maybe it's useful to make them a crunched program,
but I did not bother doing it this way.

  During the conversion, I found the following (cosmetic) bugs in
newsyslog:

1) getopt receives and argument for a -t flag, but it's not used.

2) If newsyslog is not setuid, shouldn't it be owned by bin.bin ?

3) printf lack a \n at the "Start new log..." message, and at the "chmod ..."
   message, right below.

4) The rotate algorithm is not very smart.  Maybe it should be rewritten.

					Jonny

--
Joao Carlos Mendes Luis			jonny@gta.ufrj.br
+55 21 290-4698				jonny@coppe.ufrj.br
Universidade Federal do Rio de Janeiro	UFRJ/COPPE/CISI
PGP fingerprint: 29 C0 50 B9 B6 3E 58 F2  83 5F E3 26 BF 0F EA 67

[-- Attachment #2 --]
4ZWF++n&D<%g`MPY*wg$Y<CS,k3zX_mVwhjS*66wX;[շ7hk8̀huoYAfSZtg*j.?5=JPͨSjmMF}Z# :Ov~z}94^/`uz~qn_7.|(aqޝ(eJAڗw2zw^6Z,6vsf85mA?wBg_hKk9mv%rI@W768ת]k{d?5lӏM+FmE[gzth/S"	3CϿ
^?]>g/дq((FNG.]
zr+?":ax.EK'uzŧd;a8&B@H
YPP
zܒ
	5rGi/{B:!86Hx7BʤNzc%}_DāDxQ_=M"3$ 5膱{A丽䙜9whhFR_87^̃:J~hۖ7LBfqgXNtˢE>YH|0c52c4
(.0줆CT9KG"qc'2;΀cf>3uW_Ȫp*^XtnQr9~D'jF}:kipfz$>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