1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-16 15:11:52 +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
[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