Date: Tue, 20 Jul 2010 20:03:33 +0300 From: Alex Kozlov <spam@rm-rf.kiev.ua> To: Jilles Tjoelker <jilles@stack.nl>, Gabor Kovesdan <gabor@FreeBSD.org>, svn-src-head@freebsd.org, spam@rm-rf.kiev.ua Subject: Re: svn commit: r210254 - in head/etc: defaults periodic/security Message-ID: <20100720170333.GA51595@ravenloft.kiev.ua>
next in thread | raw e-mail | index | archive | help
On Tue, Jul 20, 2010 at 05:25:05PM +0300, Alex Kozlov wrote:
> > > + echo ${name}: ${one}
> >
> > This handles pathnames with spaces incorrectly. Consider reading lines
> > with
> > IFS= read -r line
> > This also collapses the nested case statements to one, for
> > 'Information for'*, Mismatched*, '' and /*.
> >
> > The variables in the echo commands should be quoted to avoid word
> > splitting and pathname generation.
> It's makes parser stateful and overly complex, I will think about most
> simple way to do this. Fortunately, at the moment very few, if any, ports
> have files with space in names.
It's seems I was wrong, We have more that 10k files with spaces in ports.
What do think about this solution?
Index: etc/periodic/security/460.chkportsum
@@ -26,8 +26,10 @@
;;
Mismatched|'') ;;
*)
- if [ -n ${name} ]; then
- echo ${name}: ${one}
+ if [ -n "${name}" ]; then
+ #handle filenames with spaces
+ file="${one} ${two} ${three}"
+ echo "${name}: ${file%% fails the original MD5 checksum}"
fi
;;
esac
--
Adios
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100720170333.GA51595>
