summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1998-10-06 09:46:46 +0000
committerjoerg <joerg@FreeBSD.org>1998-10-06 09:46:46 +0000
commit576997d4f6355687aeb26cd35fb4221bdf7ab4ad (patch)
tree3f75090139fc5601ff3f00b49bc3fbefb0b89d7c
parent0d820bb7dbaee50ef5d47caaf49721aca9b2dc96 (diff)
downloadFreeBSD-src-576997d4f6355687aeb26cd35fb4221bdf7ab4ad.zip
FreeBSD-src-576997d4f6355687aeb26cd35fb4221bdf7ab4ad.tar.gz
Avoid the ``ruptime: no hosts in /var/rwho.'' message by not calling
rwho iff /var/rwho is empty. Call `uptime' instead. This doesn't belong under `network' right away, but at least reports the same informaton about the local system. rwhod is not turned on by default (for good reason), and i've already seen too many of the above messages...
-rwxr-xr-xetc/periodic/daily/430.status-rwho9
1 files changed, 7 insertions, 2 deletions
diff --git a/etc/periodic/daily/430.status-rwho b/etc/periodic/daily/430.status-rwho
index a86f83e..c40efaa 100755
--- a/etc/periodic/daily/430.status-rwho
+++ b/etc/periodic/daily/430.status-rwho
@@ -1,10 +1,15 @@
#!/bin/sh
#
-# $Id: 430.status-rwho,v 1.1.1.1 1997/08/12 17:51:15 pst Exp $
+# $Id: 430.status-rwho,v 1.1.1.1 1997/08/16 17:04:01 pst Exp $
#
-if [ -d /var/rwho -a -x /usr/bin/rwho ] ; then
+if [ -d /var/rwho -a -x /usr/bin/rwho -a $(ls -l /var/rwho | wc -l) -ne 0 ]
+then
echo ""
echo "Local network system status:"
ruptime
+else
+ echo ""
+ echo "Local system status:"
+ uptime
fi
OpenPOWER on IntegriCloud