Add option to include daily insecurity output in daily output. trunk
authordarcy <darcy@NetBSD.org>
Sat, 17 Dec 2011 12:27:42 +0000
branchtrunk
changeset 207513 7fe7f751c2d2
parent 207512 b22a8a459d43
child 207514 0aaf4be7b15d
Add option to include daily insecurity output in daily output. PR bin/17029
etc/daily
etc/defaults/daily.conf
--- a/etc/daily	Sat Dec 17 04:43:45 2011 +0000
+++ b/etc/daily	Sat Dec 17 12:27:42 2011 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: daily,v 1.77 2010/12/27 03:38:52 christos Exp $
+#	$NetBSD: daily,v 1.78 2011/12/17 12:27:42 darcy Exp $
 #	@(#)daily	8.2 (Berkeley) 1/25/94
 #
 
@@ -272,8 +272,13 @@
 		fi
 	fi
 	if [ -s "$SECOUT" ]; then
-		mail -s "$host daily insecurity output for $date" \
-		    "$MAILTO" < "$SECOUT"
+		if checkyesno separate_security_email; then
+			mail -s "$host daily insecurity output for $date" $MAILTO < $SECOUT
+		else
+		    echo ""
+		    echo "$host daily insecurity output for $date:"
+		    cat $SECOUT
+		fi
 	fi
 fi
 
--- a/etc/defaults/daily.conf	Sat Dec 17 04:43:45 2011 +0000
+++ b/etc/defaults/daily.conf	Sat Dec 17 12:27:42 2011 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: daily.conf,v 1.14 2010/02/05 16:29:02 jmmv Exp $
+#	$NetBSD: daily.conf,v 1.15 2011/12/17 12:27:42 darcy Exp $
 #
 # /etc/defaults/daily.conf --
 #	default configuration of /etc/daily.conf
@@ -27,6 +27,7 @@
 run_fsck_flags=""
 run_rdist=YES
 run_security=YES
+separate_security_email=YES
 run_skeyaudit=YES
 fetch_pkg_vulnerabilities=NO