#!/bin/sh -
#
-# $OpenBSD: daily,v 1.14 1996/12/07 18:46:46 millert Exp $
+# $OpenBSD: daily,v 1.15 1996/12/15 19:11:54 millert Exp $
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local
host=`hostname -s`
#egrep -v '\.core$' $TMP
fi
-rm -f $TMP
-
msgs -c
if [ -f /etc/news.expire ]; then
echo /etc/uuclean.daily | su daemon
fi
-echo ""
echo ""
echo "Checking subsystem status:"
echo ""
dump W
echo ""
-
-echo ""
-echo "mail:"
-mailq
+mailq > $TMP
+if ! grep -q "^Mail queue is empty$" $TMP; then
+ echo ""
+ echo "mail:"
+ cat $TMP
+fi
if [ -d /var/spool/uucp ]; then
- echo ""
- echo "uucp:"
- uustat -a
+ uustat -a > $TMP
+ if [ -s $TMP ]; then
+ echo ""
+ echo "uucp:"
+ cat $TMP
+ fi
fi
echo ""
netstat -i
echo ""
-if [ -d /var/rwho ]; then
+t=/var/rwho/*
+if [ "$t" != '/var/rwho/*' ]; then
ruptime
fi