Author: gabor
Date: Tue Aug 10 11:15:17 2010
New Revision: 211141
URL: http://svn.freebsd.org/changeset/base/211141

Log:
  - Fixes to the chkportsum script to handle better some special cases,
    like spaces in filename
  
  Submitted by: Alex Kozlov <s...@rm-rf.kiev.ua>
  Approved by:  delphij (mentor)

Modified:
  head/etc/periodic/security/460.chkportsum

Modified: head/etc/periodic/security/460.chkportsum
==============================================================================
--- head/etc/periodic/security/460.chkportsum   Tue Aug 10 11:02:55 2010        
(r211140)
+++ head/etc/periodic/security/460.chkportsum   Tue Aug 10 11:15:17 2010        
(r211141)
@@ -42,20 +42,20 @@ echo 'Checking for ports with mismatched
 
 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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to