xref: /freebsd/usr.sbin/periodic/etc/daily/420.status-network (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6# If there is a global system configuration file, suck it in.
7#
8if [ -r /etc/defaults/periodic.conf ]
9then
10    . /etc/defaults/periodic.conf
11    source_periodic_confs
12fi
13
14case "$daily_status_network_enable" in
15    [Yy][Ee][Ss])
16	echo ""
17	echo "Network interface status:"
18
19	flags="${daily_status_network_netstat_flags}"
20	case "$daily_status_network_usedns" in
21	    [Yy][Ee][Ss])
22		;;
23	    *)
24		flags="${flags} -n";;
25	esac
26	netstat -i ${flags} && rc=0 || rc=3;;
27
28    *)  rc=0;;
29esac
30
31exit $rc
32