Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / etc / periodic / daily / 430.status-rwho
1 #!/bin/sh
2 #
3 # $FreeBSD: src/etc/periodic/daily/430.status-rwho,v 1.3.2.2 2000/09/20 02:46:15 jkh Exp $
4 # $DragonFly: src/etc/periodic/daily/430.status-rwho,v 1.2 2003/06/17 04:24:48 dillon Exp $
5 #
6
7 # If there is a global system configuration file, suck it in.
8 #
9 if [ -r /etc/defaults/periodic.conf ]
10 then
11     . /etc/defaults/periodic.conf
12     source_periodic_confs
13 fi
14
15 case "$daily_status_rwho_enable" in
16     [Yy][Ee][Ss])
17         rwho=$(echo /var/rwho/*)
18         if [ -f "${rwho%% *}" ]
19         then
20             echo ""
21             echo "Local network system status:"
22             prog=ruptime
23         else
24             echo ""
25             echo "Local system status:"
26             prog=uptime
27         fi
28         rc=$($prog | tee /dev/stderr | wc -l)
29         if [ $? -eq 0 ]
30         then
31             [ $rc -gt 1 ] && rc=1
32         else
33             rc=3
34         fi;;
35
36     *)  rc=0;;
37 esac
38
39 exit $rc