Provide the option of running newsyslog at boot time; mainly for laptop
people.
This commit is contained in:
parent
07318ea12f
commit
d43acf7d93
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: rc.conf,v 1.2 2000/09/21 10:15:33 hubertf Exp $
|
||||
# $NetBSD: rc.conf,v 1.3 2000/09/21 10:36:02 ad Exp $
|
||||
#
|
||||
# /etc/default/rc.conf --
|
||||
# default configuration of /etc/rc.conf
|
||||
|
@ -61,6 +61,7 @@ clear_tmp=YES # clear /tmp after reboot
|
|||
update_motd=YES # updates /etc/motd
|
||||
dmesg=YES dmesg_flags="" # write /var/run/dmesg.boot
|
||||
accounting=NO # needs /var/account/acct
|
||||
newsyslog=NO newsyslog_flags="" # trim log files
|
||||
|
||||
# NOTE: default coredump name now set in /etc/sysctl.conf
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.12 2000/08/21 23:38:07 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.13 2000/09/21 10:38:04 ad Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -6,12 +6,12 @@ FILES= DAEMON LOGIN NETWORK SERVERS accounting amd apmd bootparams \
|
|||
bootconf.sh ccd cleartmp cron dhclient dhcpd dhcrelay dmesg \
|
||||
fsck gated inetd ipfilter ipmon ipnat ipsec kdc ldconfig \
|
||||
lkm1 lkm2 lkm3 local lpd mopd motd mountall mountcritlocal \
|
||||
mountcritremote mountd mrouted named network nfsd nfslocking \
|
||||
ntpd ntpdate rpcbind postfix ppp pwcheck quota raidframe \
|
||||
rarpd rbootd root route6d routed rtadvd rtsold rwho savecore \
|
||||
screenblank sendmail securelevel swap1 swap2 sysdb sysctl \
|
||||
syslogd timed ttys virecover wscons xdm xfs ypbind yppasswdd \
|
||||
ypserv
|
||||
mountcritremote mountd mrouted named network newsyslog nfsd \
|
||||
nfslocking ntpd ntpdate rpcbind postfix ppp pwcheck quota \
|
||||
raidframe rarpd rbootd root route6d routed rtadvd rtsold rwho \
|
||||
savecore screenblank sendmail securelevel swap1 swap2 sysdb \
|
||||
sysctl syslogd timed ttys virecover wscons xdm xfs ypbind \
|
||||
yppasswdd ypserv
|
||||
FILESDIR= /etc/rc.d
|
||||
FILESMODE= ${BINMODE}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: SERVERS,v 1.3 2000/08/06 21:32:56 thorpej Exp $
|
||||
# $NetBSD: SERVERS,v 1.4 2000/09/21 10:38:04 ad Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: SERVERS
|
||||
# REQUIRE: ipmon ppp savecore syslogd kdc
|
||||
# REQUIRE: ipmon kdc newsyslog ppp savecore syslogd
|
||||
|
||||
# This is a dummy dependancy, for early-start servers relying on
|
||||
# some basic configuration.
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: newsyslog,v 1.1 2000/09/21 10:38:04 ad Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: newsyslog
|
||||
# REQUIRE: mountcritremote sysdb
|
||||
# BEFORE: syslogd
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="newsyslog"
|
||||
required_files="/etc/newsyslog.conf"
|
||||
start_precmd="checkyesno newsyslog"
|
||||
start_cmd="newsyslog_start"
|
||||
stop_cmd=":"
|
||||
|
||||
newsyslog_start()
|
||||
{
|
||||
echo -n "Trimming log files:"
|
||||
/usr/bin/newsyslog -s $newsyslog_flags
|
||||
echo " done."
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
Loading…
Reference in New Issue