mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
- Update etc/rc.d/newsyslog to FreeBSD standards and install it.
- Enable it by default, running newsyslog with -CN which creates files that have the C flag specified in /etc/newsyslog.conf. - Remove the "newsyslog -CC" call from etc/rc.d/var and the check for newsyslog. - Add the C flag to entries in /etc/newsyslog.conf that are currently installed as part of the base system. There are two effects from this change: - Users who delete default syslog files to stop logging to them will need to set newsyslog_enable=NO in rc.conf or remove the C flag from those file in /etc/newsyslog.conf or they will come back on the next boot. - Diskless systems now create the same set of files that ordinary systems have by default instead of every file in newsyslog.conf.
This commit is contained in:
parent
96a9329375
commit
bb4bd97c12
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142962
|
@ -480,6 +480,8 @@ virecover_enable="YES" # Perform housekeeping for the vi(1) editor
|
|||
ugidfw_enable="NO" # Load mac_bsdextended(4) rules on boot
|
||||
bsdextended_script="/etc/rc.bsdextended" # Default mac_bsdextended(4)
|
||||
# ruleset file.
|
||||
newsyslog_enable="YES" # Run newsyslog at startup.
|
||||
newsyslog_flags="-CN" # Newsyslog flags to create marked files
|
||||
|
||||
##############################################################
|
||||
### Jail Configuration #######################################
|
||||
|
|
|
@ -19,21 +19,21 @@
|
|||
# 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 100 * J
|
||||
/var/log/auth.log 600 7 100 * J
|
||||
/var/log/auth.log 600 7 100 * JC
|
||||
/var/log/console.log 600 5 100 * J
|
||||
/var/log/cron 600 3 100 * J
|
||||
/var/log/cron 600 3 100 * JC
|
||||
/var/log/daily.log 640 7 * @T00 JN
|
||||
/var/log/debug.log 600 7 100 * J
|
||||
/var/log/debug.log 600 7 100 * JC
|
||||
/var/log/kerberos.log 600 7 100 * J
|
||||
/var/log/lpd-errs 644 7 100 * J
|
||||
/var/log/maillog 640 7 * @T00 J
|
||||
/var/log/messages 644 5 100 * J
|
||||
/var/log/lpd-errs 644 7 100 * JC
|
||||
/var/log/maillog 640 7 * @T00 JC
|
||||
/var/log/messages 644 5 100 * JC
|
||||
/var/log/monthly.log 640 12 * $M1D0 JN
|
||||
/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid
|
||||
/var/log/ppp.log root:network 640 3 100 * J
|
||||
/var/log/security 600 10 100 * J
|
||||
/var/log/ppp.log root:network 640 3 100 * JC
|
||||
/var/log/security 600 10 100 * JC
|
||||
/var/log/sendmail.st 640 10 * 168 B
|
||||
/var/log/slip.log root:network 640 3 100 * J
|
||||
/var/log/slip.log root:network 640 3 100 * JC
|
||||
/var/log/weekly.log 640 5 1 $W6D0 JN
|
||||
/var/log/wtmp 644 3 * @01T05 B
|
||||
/var/log/xferlog 600 7 100 * J
|
||||
/var/log/xferlog 600 7 100 * JC
|
||||
|
|
|
@ -22,7 +22,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
|
|||
mixer motd mountcritlocal mountcritremote \
|
||||
mountd moused mroute6d mrouted msgs \
|
||||
named natd netif netoptions \
|
||||
network_ipv6 nfsclient nfsd \
|
||||
network_ipv6 newsyslog nfsclient nfsd \
|
||||
nfslocking nfsserver nisdomain nsswitch ntpd ntpdate \
|
||||
othermta \
|
||||
pccard pcvt pf pflog \
|
||||
|
|
|
@ -5,22 +5,23 @@
|
|||
#
|
||||
|
||||
# PROVIDE: newsyslog
|
||||
# REQUIRE: mountcritremote sysdb
|
||||
# BEFORE: syslogd SERVERS
|
||||
# REQUIRE: cleanvar mountcritremote
|
||||
# BEFORE: syslogd
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="newsyslog"
|
||||
rcvar=$name
|
||||
rcvar=`set_rcvar`
|
||||
required_files="/etc/newsyslog.conf"
|
||||
command="/usr/sbin/newsyslog"
|
||||
start_cmd="newsyslog_start"
|
||||
stop_cmd=":"
|
||||
|
||||
newsyslog_start()
|
||||
{
|
||||
echo -n "Trimming log files:"
|
||||
/usr/bin/newsyslog -s $rc_flags
|
||||
echo " done."
|
||||
echo -n "Creating and/or trimming log files:"
|
||||
${command} ${rc_flags}
|
||||
echo "."
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
|
|
@ -47,8 +47,6 @@ _populate_var()
|
|||
;;
|
||||
esac
|
||||
|
||||
/usr/sbin/newsyslog -CC
|
||||
|
||||
# XXX: should create spool dirs for lpd
|
||||
}
|
||||
|
||||
|
@ -85,7 +83,7 @@ case "${populate_var}" in
|
|||
*)
|
||||
if [ -d /var/run -a -d /var/db -a -d /var/empty ] ; then
|
||||
true
|
||||
elif [ ! -x /usr/sbin/mtree -o ! -x /usr/sbin/newsyslog ] ; then
|
||||
elif [ ! -x /usr/sbin/mtree ] ; then
|
||||
false
|
||||
else
|
||||
_populate_var
|
||||
|
|
Loading…
Reference in a new issue