summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/newsyslog
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-03-02 00:40:55 +0000
committerbrooks <brooks@FreeBSD.org>2005-03-02 00:40:55 +0000
commit14774e80eefdef732d74a62d75bcdc6aff9e4c9f (patch)
treee969c9f76b3e8fece910139459351bb564710ae3 /etc/rc.d/newsyslog
parentd861d0ef47882721d597ea9b083ccadab77a0af9 (diff)
downloadFreeBSD-src-14774e80eefdef732d74a62d75bcdc6aff9e4c9f.zip
FreeBSD-src-14774e80eefdef732d74a62d75bcdc6aff9e4c9f.tar.gz
- 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.
Diffstat (limited to 'etc/rc.d/newsyslog')
-rwxr-xr-xetc/rc.d/newsyslog13
1 files changed, 7 insertions, 6 deletions
diff --git a/etc/rc.d/newsyslog b/etc/rc.d/newsyslog
index 5a3927e..9c4ed18 100755
--- a/etc/rc.d/newsyslog
+++ b/etc/rc.d/newsyslog
@@ -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
OpenPOWER on IntegriCloud