BSD 4_3_Net_2 release
[unix-history] / usr / src / etc / monthly
index 9584282..e48ddd7 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
 #!/bin/sh -
 #
-#      @(#)monthly     5.3 (Berkeley) 9/6/89
+#      @(#)monthly     5.5 (Berkeley) 6/17/91
 #
 
 host=`hostname -s`
 #
 
 host=`hostname -s`
@@ -11,13 +11,17 @@ echo "Subject: $host monthly run output"
 # ac -p | sort -nr +1
 
 echo ""
 # ac -p | sort -nr +1
 
 echo ""
-echo "Rotating wtmp files:"
-cd /var/log
-if [ -f wtmp.5 ]; then mv -f wtmp.5 wtmp.6; fi
-if [ -f wtmp.4 ]; then mv -f wtmp.4 wtmp.5; fi
-if [ -f wtmp.3 ]; then mv -f wtmp.3 wtmp.4; fi
-if [ -f wtmp.2 ]; then mv -f wtmp.2 wtmp.3; fi
-if [ -f wtmp.1 ]; then mv -f wtmp.1 wtmp.2; fi
-if [ -f wtmp.0 ]; then mv -f wtmp.0 wtmp.1; fi
-mv -f wtmp   wtmp.0
-cp /dev/null wtmp
+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 ""