From owner-freebsd-bugs Wed Sep 4 15:38:43 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA07060 for bugs-outgoing; Wed, 4 Sep 1996 15:38:43 -0700 (PDT) Received: from red.jnx.com (ppp-206-170-2-51.sntc01.pacbell.net [206.170.2.51]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA07047 for ; Wed, 4 Sep 1996 15:38:35 -0700 (PDT) Received: from base.jnx.com (base.jnx.com [208.197.169.238]) by red.jnx.com (8.7.5/8.7.3) with ESMTP id PAA27203 for ; Wed, 4 Sep 1996 15:38:32 -0700 (PDT) Received: (from pst@localhost) by base.jnx.com (8.7.5/8.7.3) id PAA11698; Wed, 4 Sep 1996 15:38:25 -0700 (PDT) To: freebsd-bugs@freebsd.com Subject: [jnx.ext.bsd.net.bugs] bin/2724: newsyslog save log even if number of copies to save is zero From: Paul Traina Date: 04 Sep 1996 15:38:24 -0700 Message-ID: <7y4tldc3dr.fsf@base.jnx.com> Lines: 63 X-Mailer: Gnus v5.2.25/XEmacs 19.14 Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk ------- Start of forwarded message ------- From: kstailey@dol-esa.gov (Kenneth Stailey) To: gnats-bugs@NetBSD.ORG Newsgroups: jnx.ext.bsd.net.bugs Subject: bin/2724: newsyslog save log even if number of copies to save is zero Message-ID: <199608302157.RAA12029@owl.dol-esa.gov> Date: 30 Aug 96 21:57:47 GMT Reply-To: kstailey@dol-esa.gov Organization: Juniper Networks, San Francisco, California >Number: 2724 >Category: bin >Synopsis: newsyslog save log even if number of copies to save is zero >Confidential: no >Severity: non-critical >Priority: low >Responsible: bin-bug-people (Utility Bug People) >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Aug 30 18:20:02 1996 >Last-Modified: >Originator: Kenneth Stailey >Organization: DOL/ESA/DASM >Release: 1.2_BETA >Environment: System: NetBSD owl 1.2_BETA NetBSD 1.2_BETA (OWL) #3: Wed Aug 21 18:26:07 EDT 1996 kstailey@owl:/usr/src/sys/arch/i386/compile/OWL [960807] i386 >Description: There is a field "ngen" in newsyslog.conf that is supposed to be the number of copies of the log to save. There is no difference in the behaviour of newsyslog if this field is set to one or zero. >How-To-Repeat: Set ngen to zero in /etc/newsyslog.conf, run newsyslog and get copies of log file anyway. >Fix: --- newsyslog.c.DIST Fri Aug 30 17:38:33 1996 +++ newsyslog.c Fri Aug 30 17:55:43 1996 @@ -427,10 +427,17 @@ if (!noaction && !(flags & CE_BINARY)) (void) log_trim(log); /* Report the trimming to the old log */ + if (numdays == -1) + if (noaction) + printf("rm %s\n",log); + else + (void) unlink(log); + else if (noaction) printf("mv %s to %s\n",log,file1); else (void) rename(log,file1); + if (noaction) printf("Start new log..."); else { >Audit-Trail: >Unformatted: ------- End of forwarded message -------