1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $FreeBSD: stable/10/etc/periodic/daily/420.status-network 235132 2012-05-07 15:41:31Z jhb $
| 3# $FreeBSD: stable/10/etc/periodic/daily/420.status-network 282243 2015-04-29 18:57:19Z jhb $
|
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
| 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}"
|
19 case "$daily_status_network_usedns" in 20 [Yy][Ee][Ss])
| 20 case "$daily_status_network_usedns" in 21 [Yy][Ee][Ss])
|
21 netstat -id && rc=0 || rc=3;;
| 22 ;;
|
22 *)
| 23 *)
|
23 netstat -idn && rc=0 || rc=3;; 24 esac;;
| 24 flags="${flags} -n";; 25 esac 26 netstat -i ${flags} && rc=0 || rc=3;;
|
25 26 *) rc=0;; 27esac 28 29exit $rc
| 27 28 *) rc=0;; 29esac 30 31exit $rc
|