mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 17:10:36 +00:00
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. Differential Revision: https://reviews.freebsd.org/D2034 Submitted by: Lystopad Aleksandr <laa@laa.zp.ua> (patch to add option for -h) Reviewed by: bz MFC after: 1 week
This commit is contained in:
parent
a4b65afcab
commit
d2077b4e57
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280721
|
@ -113,6 +113,7 @@ daily_status_gconcat_enable="NO" # Check gconcat(8)
|
||||||
# 420.status-network
|
# 420.status-network
|
||||||
daily_status_network_enable="YES" # Check network status
|
daily_status_network_enable="YES" # Check network status
|
||||||
daily_status_network_usedns="YES" # DNS lookups are ok
|
daily_status_network_usedns="YES" # DNS lookups are ok
|
||||||
|
daily_status_network_netstat_flags="-d" # netstat(1) flags
|
||||||
|
|
||||||
# 430.status-rwho
|
# 430.status-rwho
|
||||||
daily_status_rwho_enable="YES" # Check system status
|
daily_status_rwho_enable="YES" # Check system status
|
||||||
|
|
|
@ -16,12 +16,14 @@ case "$daily_status_network_enable" in
|
||||||
echo ""
|
echo ""
|
||||||
echo "Network interface status:"
|
echo "Network interface status:"
|
||||||
|
|
||||||
|
flags="${daily_status_network_netstat_flags}"
|
||||||
case "$daily_status_network_usedns" in
|
case "$daily_status_network_usedns" in
|
||||||
[Yy][Ee][Ss])
|
[Yy][Ee][Ss])
|
||||||
netstat -id && rc=0 || rc=3;;
|
;;
|
||||||
*)
|
*)
|
||||||
netstat -idn && rc=0 || rc=3;;
|
flags="${flags} -n";;
|
||||||
esac;;
|
esac
|
||||||
|
netstat -i ${flags} && rc=0 || rc=3;;
|
||||||
|
|
||||||
*) rc=0;;
|
*) rc=0;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd March 13, 2015
|
.Dd March 26, 2015
|
||||||
.Dt PERIODIC.CONF 5
|
.Dt PERIODIC.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -401,6 +401,16 @@ Set to
|
||||||
.Dq Li YES
|
.Dq Li YES
|
||||||
if you want to run
|
if you want to run
|
||||||
.Nm netstat Fl i .
|
.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
|
.It Va daily_status_network_usedns
|
||||||
.Pq Vt bool
|
.Pq Vt bool
|
||||||
Set to
|
Set to
|
||||||
|
|
Loading…
Reference in a new issue