Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Nov 2015 06:20:27 +0000 (UTC)
From:      =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r290743 - head/etc/periodic/daily
Message-ID:  <201511130620.tAD6KRR3053808@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Fri Nov 13 06:20:27 2015
New Revision: 290743
URL: https://svnweb.freebsd.org/changeset/base/290743

Log:
  Allow admins to specify a regex which is applied (in the negative) to the
  output from df, similar to what security/200.chkmounts does.  This can be
  useful to avoid listing automounted ZFS snapshots, for instance.
  
  MFC after:	1 week

Modified:
  head/etc/periodic/daily/400.status-disks

Modified: head/etc/periodic/daily/400.status-disks
==============================================================================
--- head/etc/periodic/daily/400.status-disks	Fri Nov 13 06:16:12 2015	(r290742)
+++ head/etc/periodic/daily/400.status-disks	Fri Nov 13 06:20:27 2015	(r290743)
@@ -16,7 +16,12 @@ case "$daily_status_disks_enable" in
 	echo ""
 	echo "Disk status:"
 
-	df $daily_status_disks_df_flags && rc=1 || rc=3
+	if [ -n "${daily_status_disks_ignore}" ] ; then
+		ignore="egrep -v ${daily_status_disks_ignore}"
+	else
+		ignore="cat"
+	fi
+	(df $daily_status_disks_df_flags | ${ignore}) && rc=1 || rc=3
 
 	# display which filesystems need backing up
 	if [ -s /etc/dumpdates ]; then



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