1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

- 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)
This commit is contained in:
Gabor Kovesdan 2010-08-10 11:15:17 +00:00
parent 7420b323a0
commit c2f40dcd3f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211141

View File

@ -42,20 +42,20 @@ echo 'Checking for ports with mismatched checksums:'
case "${daily_status_security_chkportsum_enable}" in case "${daily_status_security_chkportsum_enable}" in
[Yy][Ee][Ss]) [Yy][Ee][Ss])
set -f
pkg_info -ga 2>/dev/null | \ pkg_info -ga 2>/dev/null | \
while read one two three; do while IFS= read -r line; do
case ${one} in set -- $line
case $1 in
Information) Information)
case ${two} in case $2 in
for) name=${three%%:} ;; for) name="${3%%:}" ;;
*) name='??' ;; *) name='??' ;;
esac esac
;; ;;
Mismatched|'') ;; Mismatched|'') ;;
*) *) [ -n "${name}" ] &&
if [ -n ${name} ]; then echo "${name}: ${line%% fails the original MD5 checksum}"
echo ${name}: ${one}
fi
;; ;;
esac esac
done done