freebsd-dev/etc/rc.d/newsyslog
Brooks Davis bb4bd97c12 - 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.
2005-03-02 00:40:55 +00:00

29 lines
467 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: newsyslog,v 1.5 2002/03/24 15:51:26 lukem Exp $
# $FreeBSD$
#
# PROVIDE: newsyslog
# REQUIRE: cleanvar mountcritremote
# BEFORE: syslogd
. /etc/rc.subr
name="newsyslog"
rcvar=`set_rcvar`
required_files="/etc/newsyslog.conf"
command="/usr/sbin/newsyslog"
start_cmd="newsyslog_start"
stop_cmd=":"
newsyslog_start()
{
echo -n "Creating and/or trimming log files:"
${command} ${rc_flags}
echo "."
}
load_rc_config $name
run_rc_command "$1"