head	1.7;
access;
symbols
	RELENG_2_2_8_RELEASE:1.6.2.2
	RELENG_2_2_7_RELEASE:1.6.2.1
	RELENG_2_2_6_RELEASE:1.6.2.1
	RELENG_2_2_5_RELEASE:1.6
	RELENG_2_2_2_RELEASE:1.6
	RELENG_2_2_1_RELEASE:1.6
	RELENG_2_2_0_RELEASE:1.6
	RELENG_2_1_7_RELEASE:1.3.4.3
	RELENG_2_1_6_1_RELEASE:1.3.4.3
	RELENG_2_1_6_RELEASE:1.3.4.3
	RELENG_2_2:1.6.0.2
	RELENG_2_2_BP:1.6
	RELENG_2_1_5_RELEASE:1.3.4.3
	RELENG_2_1_0_RELEASE:1.3
	RELENG_2_1_0:1.3.0.4
	RELENG_2_1_0_BP:1.3
	RELENG_2_0_5_RELEASE:1.3
	RELENG_2_0_5:1.3.0.2
	RELENG_2_0_5_BP:1.3
	RELENG_2_0_5_ALPHA:1.3
	RELEASE_2_0:1.2
	BETA_2_0:1.2
	ALPHA_2_0:1.2.0.4
	MOVED_NEWCVS:1.2
	FINAL_1_1_5:1.2
	ALPHA_1_1_5:1.2
	FINAL_1_1:1.2
	GAMMA_1_1:1.2
	BETA_1_1:1.2.0.2
	BP_BETA_1_1:1.2
	FINAL_1_0:1.2
	EPSILON_1_0:1.2
	GAMMA_1_0:1.2
	BETA_1_0:1.1.1.1
	ALPHA_1_0:1.1.1.1
	V_0_0_1_0:1.1.1.1;
locks; strict;
comment	@# @;


1.7
date	97.08.13.06.12.04;	author pst;	state dead;
branches;
next	1.6;

1.6
date	96.10.19.21.52.16;	author alex;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	96.01.06.22.25.57;	author ache;	state Exp;
branches;
next	1.4;

1.4
date	96.01.05.10.09.12;	author graichen;	state Exp;
branches;
next	1.3;

1.3
date	95.05.27.01.31.40;	author ache;	state Exp;
branches
	1.3.4.1;
next	1.2;

1.2
date	93.08.31.16.29.03;	author rgrimes;	state Exp;
branches;
next	1.1;

1.1
date	93.06.20.13.41.36;	author rgrimes;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	93.06.20.13.41.37;	author rgrimes;	state Exp;
branches;
next	;

1.3.4.1
date	96.05.29.22.23.30;	author jkh;	state Exp;
branches;
next	1.3.4.2;

1.3.4.2
date	96.06.05.20.28.15;	author nate;	state Exp;
branches;
next	1.3.4.3;

1.3.4.3
date	96.06.05.21.19.03;	author nate;	state Exp;
branches;
next	;

1.6.2.1
date	98.02.09.11.44.20;	author danny;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	98.09.13.23.10.08;	author brian;	state Exp;
branches;
next	1.6.2.3;

1.6.2.3
date	99.01.01.17.44.15;	author billf;	state Exp;
branches;
next	1.6.2.4;

1.6.2.4
date	99.09.05.11.01.57;	author peter;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Make the cutover to periodic and cron.d as discussed to death on committers
for the past week.
@
text
@#!/bin/sh -
#
#	@@(#)monthly	5.5 (Berkeley) 6/17/91
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin
host=`hostname -s`
echo "Subject: $host monthly run output"

echo ""
echo "Doing login accounting:"
ac -p | sort -nr +1

if [ -f /etc/monthly.local ]; then
    echo ""
    echo "Running monthly.local:"
    sh /etc/monthly.local
fi
@


1.6
log
@Invoke weekly.local and monthly.local if they exist.

Suggested by:	jkh
@
text
@@


1.6.2.1
log
@PR:		1708, 5448
Reviewed by:	Alex Nash, Steve Price
More sensible wtmp rollover and login accounting.
@
text
@d10 3
a12 18
W=/var/log/wtmp
if [ -f $W ] ; then
	# Work out what month it was yesterday
	M=`date -v-1m +%h`

	mv -f $W $W.$M
	touch $W

	if [ -x /usr/sbin/ac ] ; then
		echo ""
		echo "Doing login accounting:"

		ac -p -w $W.$M | sort -nr +1
	fi

	rm -f $W.$M.gz
	gzip $W.$M
fi
@


1.6.2.2
log
@Add Id keyword
@
text
@a2 1
#	$Id:$
@


1.6.2.3
log
@MFC: Use FQDN instead of hostname in reports (bin/9091)
@
text
@d3 1
a3 1
#	$Id: monthly,v 1.6.2.2 1998/09/13 23:10:08 brian Exp $
d8 1
a8 1
host=`hostname`
@


1.6.2.4
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.5
log
@Uncomment login accounting, it not needed to be commented out
because not related to accounting but to wtmp only
@
text
@d13 6
@


1.4
log
@changed /etc/[daily,weekly,monthly] to not rotate the logfiles by
"hand", changed /etc/crontab to call /usr/sbin/newsyslog every hour
(the entry was there before - but we haven't had any newsyslog until
today :-) and changed /etc/inetd.conf to also contain (commentet out)
entries for rpc.rquotad and rpc.sprayd (taken from NetBSD)
@
text
@d10 3
a12 3
# echo ""
# echo "Doing login accounting:"
# ac -p | sort -nr +1
@


1.3
log
@Use proper PATH in front of monthly
Eliminate Subject duplication for insecure output
@
text
@a12 16

echo ""
echo -n "Rotating log files:"
cd /var/log
for i in kerberos.log lpd-errs wtmp; do
	echo -n " $i"
	if [ -f $i.5 ]; then mv -f $i.5 $i.6; fi
	if [ -f $i.4 ]; then mv -f $i.4 $i.5; fi
	if [ -f $i.3 ]; then mv -f $i.3 $i.4; fi
	if [ -f $i.2 ]; then mv -f $i.2 $i.3; fi
	if [ -f $i.1 ]; then mv -f $i.1 $i.2; fi
	if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi
	if [ -f $i ]; then mv -f $i $i.0; fi
	>$i
done
echo ""
@


1.3.4.1
log
@Merge from HEAD, except:

	Clients that used gnumalloc still do, despite the merge.  We're not
	bringing phkmalloc over.

	Thread stuff left out.

	PCCARD support left out.
@
text
@d10 18
a28 2
echo "Doing login accounting:"
ac -p | sort -nr +1
@


1.3.4.2
log
@Mega-commit cleanup.  Don't use newsyslog(8) for logfile rotations since
it doesn't exist in -stable, so revert to using the old methods.
@
text
@a12 15

echo ""
echo -n "Rotating log files:"
cd /var/log
for i in kerberos.log lpd-errs wtmp; do
	echo -n " $i"
	if [ -f $i.5 ]; then mv -f $i.5 $i.6; fi
	if [ -f $i.4 ]; then mv -f $i.4 $i.5; fi
	if [ -f $i.3 ]; then mv -f $i.3 $i.4; fi
	if [ -f $i.2 ]; then mv -f $i.2 $i.3; fi
	if [ -f $i.1 ]; then mv -f $i.1 $i.2; fi
	if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi
	if [ -f $i ]; then mv -f $i $i.0; fi
	>$i
done
@


1.3.4.3
log
@Add an 'echo ""' that was on the end of the file on the previous version
that I missed when I updated the stuff after mega-commit.
@
text
@a27 1
echo ""
@


1.2
log
@Reenabled rotation of log files and killing of syslogd now that the
lockup problem is fixed.
@
text
@d6 1
@


1.1
log
@Initial revision
@
text
@d15 1
a15 1
#cd /var/log
@


1.1.1.1
log
@Initial import of 386BSD 0.1 othersrc/etc
@
text
@@
