summaryrefslogtreecommitdiffstats
path: root/etc/periodic/daily/420.status-network
blob: 13ae1e8b8b67b64db21d923cfe42c426a98efbbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
# $FreeBSD$
#

# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
    . /etc/defaults/periodic.conf
    source_periodic_confs
fi

case "$daily_status_network_enable" in
    [Yy][Ee][Ss])
	echo ""
	echo "Network interface status:"

	case "$daily_status_network_usedns" in
	    [Yy][Ee][Ss])
		netstat -id && rc=0 || rc=3;;
	    *)
		netstat -idn && rc=0 || rc=3;;
	esac;;

    *)  rc=0;;
esac

exit $rc
OpenPOWER on IntegriCloud