svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk
Ngie Cooper
ngie at FreeBSD.org
Sat May 13 03:10:54 UTC 2017
Author: ngie
Date: Sat May 13 03:10:50 2017
New Revision: 318250
URL: https://svnweb.freebsd.org/changeset/base/318250
Log:
Handle the logfiles in newsyslog and syslogd conditionally, based on
src.conf(5) knobs
This will allow consumers of FreeBSD to use the unmodified configuration
files out of the box more than previously.
Both newsyslog.conf and syslog.conf:
- /var/log/lpd-errs (MK_LPR != no)
- /var/log/ppp.log (MK_PPP != no)
- /var/log/xferlog (MK_FTP != no)
newsyslog.conf:
- /var/log/amd.log (MK_AMD != no)
- /var/log/pflog (MK_PF != no)
- /var/log/sendmail.st (MK_SENDMAIL != no)
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Added:
head/etc/newsyslog.conf.d/amd.conf (contents, props changed)
head/etc/newsyslog.conf.d/ftp.conf (contents, props changed)
head/etc/newsyslog.conf.d/lpr.conf (contents, props changed)
head/etc/newsyslog.conf.d/pf.conf (contents, props changed)
head/etc/newsyslog.conf.d/ppp.conf (contents, props changed)
head/etc/newsyslog.conf.d/sendmail.conf (contents, props changed)
head/etc/syslog.d/
head/etc/syslog.d/Makefile (contents, props changed)
head/etc/syslog.d/ftp.conf (contents, props changed)
head/etc/syslog.d/lpr.conf (contents, props changed)
head/etc/syslog.d/ppp.conf (contents, props changed)
Modified:
head/etc/Makefile
head/etc/newsyslog.conf
head/etc/newsyslog.conf.d/Makefile
head/etc/syslog.conf
head/tools/build/mk/OptionalObsoleteFiles.inc
Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile Fri May 12 18:37:08 2017 (r318249)
+++ head/etc/Makefile Sat May 13 03:10:50 2017 (r318250)
@@ -8,7 +8,8 @@ FILESGROUPS= FILES
# No need as it is empty and just causes rebuilds since this file does so much.
UPDATE_DEPENDFILE= no
SUBDIR= \
- newsyslog.conf.d
+ newsyslog.conf.d \
+ syslog.d
.if ${MK_SENDMAIL} != "no"
SUBDIR+=sendmail
Modified: head/etc/newsyslog.conf
==============================================================================
--- head/etc/newsyslog.conf Fri May 12 18:37:08 2017 (r318249)
+++ head/etc/newsyslog.conf Sat May 13 03:10:50 2017 (r318250)
@@ -18,7 +18,6 @@
#
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/var/log/all.log 600 7 * @T00 J
-/var/log/amd.log 644 7 1000 * J
/var/log/auth.log 600 7 1000 @0101T JC
/var/log/console.log 600 5 1000 * J
/var/log/cron 600 3 1000 * JC
@@ -26,18 +25,13 @@
/var/log/debug.log 600 7 1000 * JC
/var/log/init.log 644 3 1000 * J
/var/log/kerberos.log 600 7 1000 * J
-/var/log/lpd-errs 644 7 1000 * JC
/var/log/maillog 640 7 * @T00 JC
/var/log/messages 644 5 1000 @0101T JC
/var/log/monthly.log 640 12 * $M1D0 JN
-/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid
-/var/log/ppp.log root:network 640 3 1000 * JC
/var/log/devd.log 644 3 1000 * JC
/var/log/security 600 10 1000 * JC
-/var/log/sendmail.st 640 10 * 168 BN
/var/log/utx.log 644 3 * @01T05 B
/var/log/weekly.log 640 5 * $W6D0 JN
-/var/log/xferlog 600 7 1000 * JC
<include> /etc/newsyslog.conf.d/*
<include> /usr/local/etc/newsyslog.conf.d/*
Modified: head/etc/newsyslog.conf.d/Makefile
==============================================================================
--- head/etc/newsyslog.conf.d/Makefile Fri May 12 18:37:08 2017 (r318249)
+++ head/etc/newsyslog.conf.d/Makefile Sat May 13 03:10:50 2017 (r318250)
@@ -6,8 +6,32 @@ BINDIR= /etc/newsyslog.conf.d
FILES=
+.if ${MK_AMD} != "no"
+FILES+= amd.conf
+.endif
+
+.if ${MK_FTP} != "no"
+FILES+= ftp.conf
+.endif
+
+.if ${MK_LPR} != "no"
+FILES+= lpr.conf
+.endif
+
.if ${MK_OFED} != "no"
FILES+= opensm.conf
.endif
+.if ${MK_PF} != "no"
+FILES+= pf.conf
+.endif
+
+.if ${MK_PPP} != "no"
+FILES+= ppp.conf
+.endif
+
+.if ${MK_SENDMAIL} != "no"
+FILES+= sendmail.conf
+.endif
+
.include <bsd.prog.mk>
Added: head/etc/newsyslog.conf.d/amd.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/newsyslog.conf.d/amd.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+/var/log/amd.log 644 7 1000 * J
Added: head/etc/newsyslog.conf.d/ftp.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/newsyslog.conf.d/ftp.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+/var/log/xferlog 600 7 1000 * JC
Added: head/etc/newsyslog.conf.d/lpr.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/newsyslog.conf.d/lpr.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+/var/log/lpd-errs 644 7 1000 * JC
Added: head/etc/newsyslog.conf.d/pf.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/newsyslog.conf.d/pf.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid
Added: head/etc/newsyslog.conf.d/ppp.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/newsyslog.conf.d/ppp.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+/var/log/ppp.log root:network 640 3 1000 * JC
Added: head/etc/newsyslog.conf.d/sendmail.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/newsyslog.conf.d/sendmail.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+/var/log/sendmail.st 640 10 * 168 BN
Modified: head/etc/syslog.conf
==============================================================================
--- head/etc/syslog.conf Fri May 12 18:37:08 2017 (r318249)
+++ head/etc/syslog.conf Sat May 13 03:10:50 2017 (r318250)
@@ -10,8 +10,6 @@
security.* /var/log/security
auth.info;authpriv.info /var/log/auth.log
mail.info /var/log/maillog
-lpr.info /var/log/lpd-errs
-ftp.info /var/log/xferlog
cron.* /var/log/cron
!-devd
*.=debug /var/log/debug.log
@@ -31,8 +29,6 @@ cron.* /var/log/cron
# Uncomment this if you wish to see messages produced by devd
# !devd
# *.>=notice /var/log/devd.log
-!ppp
-*.* /var/log/ppp.log
!*
include /etc/syslog.d
include /usr/local/etc/syslog.d
Added: head/etc/syslog.d/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/syslog.d/Makefile Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+.if ${MK_FTP} != "no"
+FILES+= ftp.conf
+.endif
+
+.if ${MK_LPR} != "no"
+FILES+= lpr.conf
+.endif
+
+.if ${MK_PPP} != "no"
+FILES+= ppp.conf
+.endif
+
+BINDIR= /etc/syslog.d
+
+.include <bsd.prog.mk>
Added: head/etc/syslog.d/ftp.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/syslog.d/ftp.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+ftp.info /var/log/xferlog
Added: head/etc/syslog.d/lpr.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/syslog.d/lpr.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+lpr.info /var/log/lpd-errs
Added: head/etc/syslog.d/ppp.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/syslog.d/ppp.conf Sat May 13 03:10:50 2017 (r318250)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+!ppp
+*.* /var/log/ppp.log
Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 12 18:37:08 2017 (r318249)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat May 13 03:10:50 2017 (r318250)
@@ -56,6 +56,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz
.if ${MK_AMD} == no
OLD_FILES+=etc/amd.map
+OLD_FILES+=etc/newsyslog.conf.d/amd.conf
OLD_FILES+=etc/rc.d/amd
OLD_FILES+=usr/bin/pawd
OLD_FILES+=usr/sbin/amd
@@ -1588,9 +1589,11 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.g
.if ${MK_FTP} == no
OLD_FILES+=etc/ftpusers
+OLD_FILES+=etc/newsyslog.conf.d/ftp.conf
OLD_FILES+=etc/pam.d/ftp
OLD_FILES+=etc/pam.d/ftpd
OLD_FILES+=etc/rc.d/ftpd
+OLD_FILES+=etc/syslog.d/ftp.conf
OLD_FILES+=usr/bin/ftp
OLD_FILES+=usr/bin/gate-ftp
OLD_FILES+=usr/bin/pftp
@@ -6183,7 +6186,9 @@ OLD_FILES+=usr/share/man/man8/updatedb.8
.if ${MK_LPR} == no
OLD_FILES+=etc/hosts.lpd
OLD_FILES+=etc/printcap
+OLD_FILES+=etc/newsyslog.conf.d/lpr.conf
OLD_FILES+=etc/rc.d/lpd
+OLD_FILES+=etc/syslog.d/lpr.conf
OLD_FILES+=usr/bin/lp
OLD_FILES+=usr/bin/lpq
OLD_FILES+=usr/bin/lpr
@@ -7158,6 +7163,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinsta
.endif
.if ${MK_PF} == no
+OLD_FILES+=etc/newsyslog.conf.d/pf.conf
OLD_FILES+=etc/periodic/security/520.pfdenied
OLD_FILES+=etc/pf.os
OLD_FILES+=etc/rc.d/ftp-proxy
@@ -7297,7 +7303,9 @@ OLD_FILES+=usr/share/man/man8/portsnap.8
.endif
.if ${MK_PPP} == no
+OLD_FILES+=etc/newsyslog.conf.d/ppp.conf
OLD_FILES+=etc/ppp/ppp.conf
+OLD_FILES+=etc/syslog.d/ppp.conf
OLD_DIRS+=etc/ppp
OLD_FILES+=usr/sbin/ppp
OLD_FILES+=usr/sbin/pppctl
@@ -7473,6 +7481,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8.
.endif
.if ${MK_SENDMAIL} == no
+OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf
OLD_FILES+=etc/periodic/daily/150.clean-hoststat
OLD_FILES+=etc/periodic/daily/440.status-mailq
OLD_FILES+=etc/periodic/daily/460.status-mail-rejects
More information about the svn-src-head
mailing list