[Bug 233633] [patch] newsyslog(8): Time interval does not work
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Nov 29 13:20:29 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233633
Bug ID: 233633
Summary: [patch] newsyslog(8): Time interval does not work
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: katsu at miyoshi.matsuyama.ehime.jp
Created attachment 199664
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=199664&action=edit
patch age_old_log()
=======================================================================
[/etc/newsyslog.conf.d/sendmail.conf]
/var/log/sendmail.st 640 10 * 168 BN
=======================================================================
=======================================================================
$ ls -l /var/log/sendmail.st*
-rw-r----- 1 root wheel 0 Nov 29 12:00 /var/log/sendmail.st
-rw-r----- 1 root wheel 0 Nov 29 12:00 /var/log/sendmail.st.0
-rw-r----- 1 root wheel 0 Nov 29 11:00 /var/log/sendmail.st.1
-rw-r----- 1 root wheel 0 Nov 29 10:00 /var/log/sendmail.st.2
-rw-r----- 1 root wheel 0 Nov 29 09:00 /var/log/sendmail.st.3
-rw-r----- 1 root wheel 0 Nov 29 08:00 /var/log/sendmail.st.4
-rw-r----- 1 root wheel 0 Nov 29 07:00 /var/log/sendmail.st.5
-rw-r----- 1 root wheel 0 Nov 29 06:00 /var/log/sendmail.st.6
-rw-r----- 1 root wheel 0 Nov 29 05:00 /var/log/sendmail.st.7
-rw-r----- 1 root wheel 0 Nov 29 04:00 /var/log/sendmail.st.8
-rw-r----- 1 root wheel 0 Nov 29 03:00 /var/log/sendmail.st.9
=======================================================================
Time Interval (168) does not work.
=======================================================================
$ newsyslog -nv /var/log/sendmail.st
Processing /etc/newsyslog.conf
Found: <include> /etc/newsyslog.conf.d/[!.]*.conf
Found: <include> /usr/local/etc/newsyslog.conf.d/[!.]*.conf
Processing /etc/newsyslog.conf.d/amd.conf
Processing /etc/newsyslog.conf.d/ftp.conf
Processing /etc/newsyslog.conf.d/lpr.conf
Processing /etc/newsyslog.conf.d/opensm.conf
Processing /etc/newsyslog.conf.d/pf.conf
Processing /etc/newsyslog.conf.d/ppp.conf
Processing /etc/newsyslog.conf.d/sendmail.conf
/var/log/sendmail.st <10>: age (hr): -1 [168] --> trimming log....
rm -f /var/log/sendmail.st.10
rm -f /var/log/sendmail.st.10.gz
rm -f /var/log/sendmail.st.10.bz2
<<snip>>
=======================================================================
'-1' is wrong.
Fix: patch age_old_log()
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list