summaryrefslogtreecommitdiffstats
path: root/etc/periodic
diff options
context:
space:
mode:
authorgabor <gabor@FreeBSD.org>2010-08-10 11:15:17 +0000
committergabor <gabor@FreeBSD.org>2010-08-10 11:15:17 +0000
commit0caf1f394296d4cea1b373807772a5a23bf16fc3 (patch)
tree837cfc5cb34860c4327eb48831bebdfc2c9252dd /etc/periodic
parent4aa18f4682e7e866c944570267644938a1af0ccf (diff)
downloadFreeBSD-src-0caf1f394296d4cea1b373807772a5a23bf16fc3.zip
FreeBSD-src-0caf1f394296d4cea1b373807772a5a23bf16fc3.tar.gz
- Fixes to the chkportsum script to handle better some special cases,
like spaces in filename Submitted by: Alex Kozlov <spam@rm-rf.kiev.ua> Approved by: delphij (mentor)
Diffstat (limited to 'etc/periodic')
-rw-r--r--etc/periodic/security/460.chkportsum18
1 files changed, 9 insertions, 9 deletions
diff --git a/etc/periodic/security/460.chkportsum b/etc/periodic/security/460.chkportsum
index be11684..3a39c84 100644
--- a/etc/periodic/security/460.chkportsum
+++ b/etc/periodic/security/460.chkportsum
@@ -42,20 +42,20 @@ echo 'Checking for ports with mismatched checksums:'
case "${daily_status_security_chkportsum_enable}" in
[Yy][Ee][Ss])
+ set -f
pkg_info -ga 2>/dev/null | \
- while read one two three; do
- case ${one} in
+ while IFS= read -r line; do
+ set -- $line
+ case $1 in
Information)
- case ${two} in
- for) name=${three%%:} ;;
- *) name='??' ;;
+ case $2 in
+ for) name="${3%%:}" ;;
+ *) name='??' ;;
esac
;;
Mismatched|'') ;;
- *)
- if [ -n ${name} ]; then
- echo ${name}: ${one}
- fi
+ *) [ -n "${name}" ] &&
+ echo "${name}: ${line%% fails the original MD5 checksum}"
;;
esac
done
OpenPOWER on IntegriCloud