diff options
author | brooks <brooks@FreeBSD.org> | 2005-03-02 00:40:55 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-03-02 00:40:55 +0000 |
commit | 14774e80eefdef732d74a62d75bcdc6aff9e4c9f (patch) | |
tree | e969c9f76b3e8fece910139459351bb564710ae3 /etc/rc.d | |
parent | d861d0ef47882721d597ea9b083ccadab77a0af9 (diff) | |
download | FreeBSD-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')
-rwxr-xr-x | etc/rc.d/Makefile | 2 | ||||
-rwxr-xr-x | etc/rc.d/newsyslog | 13 | ||||
-rw-r--r-- | etc/rc.d/var | 4 |
3 files changed, 9 insertions, 10 deletions
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index f40d173..6f895ec 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -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 \ 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 diff --git a/etc/rc.d/var b/etc/rc.d/var index 8c33ac3..af6bb9c 100644 --- a/etc/rc.d/var +++ b/etc/rc.d/var @@ -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 |