summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2016-02-01 22:16:41 +0000
committermarius <marius@FreeBSD.org>2016-02-01 22:16:41 +0000
commit90b6006f8d6ccaaaa6ebef08c2fa902a3b796e21 (patch)
treee19310a7a7efde2b96e91f6bace7caa254ed699b /etc
parent83c1d10f0ce6085d288212702d5b72432e3a184b (diff)
downloadFreeBSD-src-90b6006f8d6ccaaaa6ebef08c2fa902a3b796e21.zip
FreeBSD-src-90b6006f8d6ccaaaa6ebef08c2fa902a3b796e21.tar.gz
MFC: r295032
Use '^[>+][^+]' instead of '^[>+]' with grep(1) when filtering the diff(1) output between two files in "new_only"-mode. Otherwise, with the default of using unified format a remnant of the header in the output is the result. This is especially irritating when the two files differ but the second one is empty, amounting to the vestige of the header being the only readout. Reported by: Stefan Haemmerl Approved by: re (delphij)
Diffstat (limited to 'etc')
-rw-r--r--etc/periodic/security/security.functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/periodic/security/security.functions b/etc/periodic/security/security.functions
index bc2bcba..c2c757a 100644
--- a/etc/periodic/security/security.functions
+++ b/etc/periodic/security/security.functions
@@ -51,7 +51,7 @@ check_diff() {
rc=0
if [ "$1" = "new_only" ]; then
shift
- filter="grep '^[>+]'"
+ filter="grep '^[>+][^+]'"
else
filter="cat"
fi
OpenPOWER on IntegriCloud