diff options
author | gabor <gabor@FreeBSD.org> | 2010-08-10 11:15:17 +0000 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2010-08-10 11:15:17 +0000 |
commit | 0caf1f394296d4cea1b373807772a5a23bf16fc3 (patch) | |
tree | 837cfc5cb34860c4327eb48831bebdfc2c9252dd /etc/periodic | |
parent | 4aa18f4682e7e866c944570267644938a1af0ccf (diff) | |
download | FreeBSD-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.chkportsum | 18 |
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 |