Bug#279205: exim4-base: Correct with this

Andreas Metzler Andreas Metzler <ametzler@downhill.at.eu.org>, 279205@bugs.debian.org
Sat, 6 Nov 2004 12:22:36 +0100


On 2004-11-01 Marc Haber <mh+debian-packages@zugschlus.de> wrote:
> On Mon, Nov 01, 2004 at 02:47:01PM +0100, Antonio Biasio wrote:
[...]
> > 	if [ -e $file ]; then exim_tidydb_as_mail /var/spool/exim4 $file >/dev/null
[...]
> That's a bad fix. Probably the script should be rewritten with some
> find construction.

What do you think about this one:
if [ -x /usr/sbin/exim_tidydb ]; then
  cd /var/spool/exim4/db || exit 1
  find /var/spool/exim4/db -maxdepth 1 -name '*.lockfile' \
       -or -type f -printf '%f\n' | \
  while read file ; do
        exim_tidydb_as_mail /var/spool/exim4 "$file" >/dev/null
  done
fi

It is not perfect (like find ... -exec or find -print0 | xargs -0) but
afaict that is not necessary.
               cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"