Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2015 18:57:20 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r282243 - in stable: 10/etc/defaults 10/etc/periodic/daily 10/share/man/man5 9/etc/defaults 9/etc/periodic/daily 9/share/man/man5
Message-ID:  <201504291857.t3TIvKe3069972@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Apr 29 18:57:19 2015
New Revision: 282243
URL: https://svnweb.freebsd.org/changeset/base/282243

Log:
  MFC 280721:
  Allow additional flags to be passed to netstat -i in the daily status check.
  In particular, this allows an administrator to specify "-h" for human
  readable output if that is preferred.
  
  The default setting passes "-d", so that can be excluded by using a custom
  setting.

Modified:
  stable/10/etc/defaults/periodic.conf
  stable/10/etc/periodic/daily/420.status-network
  stable/10/share/man/man5/periodic.conf.5
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/etc/defaults/periodic.conf
  stable/9/etc/periodic/daily/420.status-network
  stable/9/share/man/man5/periodic.conf.5
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/share/man/man5/   (props changed)

Modified: stable/10/etc/defaults/periodic.conf
==============================================================================
--- stable/10/etc/defaults/periodic.conf	Wed Apr 29 18:07:58 2015	(r282242)
+++ stable/10/etc/defaults/periodic.conf	Wed Apr 29 18:57:19 2015	(r282243)
@@ -117,6 +117,7 @@ daily_status_gconcat_enable="NO"			# Che
 # 420.status-network
 daily_status_network_enable="YES"			# Check network status
 daily_status_network_usedns="YES"			# DNS lookups are ok
+daily_status_network_netstat_flags="-d"			# netstat(1) flags
 
 # 430.status-rwho
 daily_status_rwho_enable="YES"				# Check system status

Modified: stable/10/etc/periodic/daily/420.status-network
==============================================================================
--- stable/10/etc/periodic/daily/420.status-network	Wed Apr 29 18:07:58 2015	(r282242)
+++ stable/10/etc/periodic/daily/420.status-network	Wed Apr 29 18:57:19 2015	(r282243)
@@ -16,12 +16,14 @@ case "$daily_status_network_enable" in
 	echo ""
 	echo "Network interface status:"
 
+	flags="${daily_status_network_netstat_flags}"
 	case "$daily_status_network_usedns" in
 	    [Yy][Ee][Ss])
-		netstat -id && rc=0 || rc=3;;
+		;;
 	    *)
-		netstat -idn && rc=0 || rc=3;;
-	esac;;
+		flags="${flags} -n";;
+	esac
+	netstat -i ${flags} && rc=0 || rc=3;;
 
     *)  rc=0;;
 esac

Modified: stable/10/share/man/man5/periodic.conf.5
==============================================================================
--- stable/10/share/man/man5/periodic.conf.5	Wed Apr 29 18:07:58 2015	(r282242)
+++ stable/10/share/man/man5/periodic.conf.5	Wed Apr 29 18:57:19 2015	(r282243)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 13, 2015
+.Dd March 26, 2015
 .Dt PERIODIC.CONF 5
 .Os
 .Sh NAME
@@ -401,6 +401,16 @@ Set to
 .Dq Li YES
 if you want to run
 .Nm netstat Fl i .
+.It Va daily_status_network_netstat_flags
+.Pq Vt str
+Set to additional arguments for the
+.Xr netstat 1
+utility when
+.Va daily_status_network_enable
+is set to
+.Dq Li YES .
+The default is
+.Fl d .
 .It Va daily_status_network_usedns
 .Pq Vt bool
 Set to



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504291857.t3TIvKe3069972>