[PATCH] Trim some noise from the daily disk check

Brooks Davis brooks at freebsd.org
Wed Jun 20 17:25:14 UTC 2012


On Wed, Jun 20, 2012 at 09:35:27AM -0400, John Baldwin wrote:
> The daily periodic e-mails for my boxes always include useless output from 
> dump -W.  I think the daily e-mail should only do that if the sysadmin is 
> actually using dump.  The patch below skips the dump reporting it 
> /etc/dumpdates doesn't exist or exists and is an empty file (the latter is 
> what you get out-of-the-box):
> 
> Index: 400.status-disks
> ===================================================================
> --- 400.status-disks	(revision 237227)
> +++ 400.status-disks	(working copy)
> @@ -19,13 +19,16 @@ case "$daily_status_disks_enable" in
>  	df $daily_status_disks_df_flags && rc=1 || rc=3
>  
>  	# display which filesystems need backing up
> -	if ! [ -f /etc/fstab ]; then
> -		export PATH_FSTAB=/dev/null
> +	if [ -s /etc/dumpdates ]; then
> +		if ! [ -f /etc/fstab ]; then
> +			export PATH_FSTAB=/dev/null
> +		fi
> +
> +		echo ""
> +		dump W || rc=3
>  	fi
> +	;;
>  
> -	echo ""
> -	dump W || rc=3;;
> -
>      *)  rc=0;;
>  esac
>  
> Thoughts?

This seems sensible to me.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120620/d50f5a60/attachment.pgp


More information about the freebsd-current mailing list