Date: 04 Sep 1996 15:38:24 -0700 From: Paul Traina <pst@jnx.com> 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 Message-ID: <7y4tldc3dr.fsf@base.jnx.com>
next in thread | raw e-mail | index | archive | help
------- 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 -------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7y4tldc3dr.fsf>