diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2017-05-13 03:10:50 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2017-05-13 03:10:50 +0000 |
commit | e5c4c8aa7fda6305f93e2bf378a89186722310a8 (patch) | |
tree | 1f34038235e42ec505b03ae12430152b7dcb6461 /etc | |
parent | d74da94ce422253b6a7f97223f563e3ec91d55e6 (diff) | |
download | src-e5c4c8aa7fda6305f93e2bf378a89186722310a8.tar.gz src-e5c4c8aa7fda6305f93e2bf378a89186722310a8.zip |
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
Notes
Notes:
svn path=/head/; revision=318250
Diffstat (limited to 'etc')
-rw-r--r-- | etc/Makefile | 3 | ||||
-rw-r--r-- | etc/newsyslog.conf | 6 | ||||
-rw-r--r-- | etc/newsyslog.conf.d/Makefile | 24 | ||||
-rw-r--r-- | etc/newsyslog.conf.d/amd.conf | 2 | ||||
-rw-r--r-- | etc/newsyslog.conf.d/ftp.conf | 2 | ||||
-rw-r--r-- | etc/newsyslog.conf.d/lpr.conf | 2 | ||||
-rw-r--r-- | etc/newsyslog.conf.d/pf.conf | 2 | ||||
-rw-r--r-- | etc/newsyslog.conf.d/ppp.conf | 2 | ||||
-rw-r--r-- | etc/newsyslog.conf.d/sendmail.conf | 2 | ||||
-rw-r--r-- | etc/syslog.conf | 4 | ||||
-rw-r--r-- | etc/syslog.d/Makefile | 19 | ||||
-rw-r--r-- | etc/syslog.d/ftp.conf | 2 | ||||
-rw-r--r-- | etc/syslog.d/lpr.conf | 2 | ||||
-rw-r--r-- | etc/syslog.d/ppp.conf | 3 |
14 files changed, 64 insertions, 11 deletions
diff --git a/etc/Makefile b/etc/Makefile index 153e56787632..8bfeac2b6b96 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -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 diff --git a/etc/newsyslog.conf b/etc/newsyslog.conf index 7a969691a8bf..9982f91dfc11 100644 --- a/etc/newsyslog.conf +++ b/etc/newsyslog.conf @@ -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/* diff --git a/etc/newsyslog.conf.d/Makefile b/etc/newsyslog.conf.d/Makefile index c2574b74c432..a831f3d2c6f6 100644 --- a/etc/newsyslog.conf.d/Makefile +++ b/etc/newsyslog.conf.d/Makefile @@ -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> diff --git a/etc/newsyslog.conf.d/amd.conf b/etc/newsyslog.conf.d/amd.conf new file mode 100644 index 000000000000..329652dd5135 --- /dev/null +++ b/etc/newsyslog.conf.d/amd.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/amd.log 644 7 1000 * J diff --git a/etc/newsyslog.conf.d/ftp.conf b/etc/newsyslog.conf.d/ftp.conf new file mode 100644 index 000000000000..c12e24d7066f --- /dev/null +++ b/etc/newsyslog.conf.d/ftp.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/xferlog 600 7 1000 * JC diff --git a/etc/newsyslog.conf.d/lpr.conf b/etc/newsyslog.conf.d/lpr.conf new file mode 100644 index 000000000000..5febb309c6ec --- /dev/null +++ b/etc/newsyslog.conf.d/lpr.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/lpd-errs 644 7 1000 * JC diff --git a/etc/newsyslog.conf.d/pf.conf b/etc/newsyslog.conf.d/pf.conf new file mode 100644 index 000000000000..7c41c816c1ff --- /dev/null +++ b/etc/newsyslog.conf.d/pf.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid diff --git a/etc/newsyslog.conf.d/ppp.conf b/etc/newsyslog.conf.d/ppp.conf new file mode 100644 index 000000000000..198579dae27a --- /dev/null +++ b/etc/newsyslog.conf.d/ppp.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/ppp.log root:network 640 3 1000 * JC diff --git a/etc/newsyslog.conf.d/sendmail.conf b/etc/newsyslog.conf.d/sendmail.conf new file mode 100644 index 000000000000..5cb59c4e8c18 --- /dev/null +++ b/etc/newsyslog.conf.d/sendmail.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/sendmail.st 640 10 * 168 BN diff --git a/etc/syslog.conf b/etc/syslog.conf index a137bdcae65f..e0df421b9021 100644 --- a/etc/syslog.conf +++ b/etc/syslog.conf @@ -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 diff --git a/etc/syslog.d/Makefile b/etc/syslog.d/Makefile new file mode 100644 index 000000000000..56047ed2bfba --- /dev/null +++ b/etc/syslog.d/Makefile @@ -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> diff --git a/etc/syslog.d/ftp.conf b/etc/syslog.d/ftp.conf new file mode 100644 index 000000000000..d4d11cfb7a65 --- /dev/null +++ b/etc/syslog.d/ftp.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +ftp.info /var/log/xferlog diff --git a/etc/syslog.d/lpr.conf b/etc/syslog.d/lpr.conf new file mode 100644 index 000000000000..0eb6eb06db2a --- /dev/null +++ b/etc/syslog.d/lpr.conf @@ -0,0 +1,2 @@ +# $FreeBSD$ +lpr.info /var/log/lpd-errs diff --git a/etc/syslog.d/ppp.conf b/etc/syslog.d/ppp.conf new file mode 100644 index 000000000000..57ee868bd142 --- /dev/null +++ b/etc/syslog.d/ppp.conf @@ -0,0 +1,3 @@ +# $FreeBSD$ +!ppp +*.* /var/log/ppp.log |