|
From: Gianpaolo D. M. <gia...@ge...> - 2005-07-05 06:24:10
|
=20
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Lionel,
Thank you for your feedback.
I will be testing it later this day.
Regards,
Gianpaolo
=20
- -----Urspr=FCngliche Nachricht-----
Von: Lionel Bouton [mailto:lio...@bo...]=20
Gesendet: Dienstag, 5. Juli 2005 02:07
An: Gianpaolo Del Matto
Cc: sql...@li...
Betreff: Re: [Sqlgrey-users] new update_sqlgrey_config script [was:
SQLgrey Feature Requests]
Hi,
I finally found some time to check your contribution.
Gianpaolo Del Matto wrote the following on 24.06.2005 15:38 :
>=20
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Lionel,
>
>Find a new version of update_sqlgrey_config attached to this
>message. I've ported the whole thing over to Perl as it is more
>portable than a bash script (eg. FreeBSD misses md5sum and it's own
>md5 has a different syntax).
> =20
>
I made some changes...
A problem with check_procs:
- - it didn't work properly on Linux (ps -x is not a valid syntax).
- - if for example you do a "vi update_sqlgrey_config" and launch it,
check_procs thinks update_sqlgrey_config is alrealy launched.
As the window for a race condition is now reduced (only move files
around after all downloads, see below), I removed check_procs
completely.
Revert to original update_sqlgrey_config behaviour, specifically :
- - don't download files that already match the checksum,
- - don't replace any file unless all files downloaded match the
checksum,
- - don't print anything unless something had to be done (don't want
cron to send mails each time this script is called, a new
- --verbose|-v flag overrides this).
The code for managing the temp directory is replaced. This one should
be guaranteed collision-free by use of File::Temp::tempdir, the
details for file/directory removal are handled by File::Temp
("CLEANUP =3D> 1" in the tempdir call).
There will be a lot of new dependencies with this script. I think
I'll provide both update_sqlgrey_config files in the future as they
both have their usage. The shell one is small and only needs md5sum,
the perl one is more clean and probably easier to port.
You'll find the result attached.
Lionel.
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1
iQA/AwUBQsooWy+TvXspauGfEQLaWwCgg/7wLfKKEi39x56CrQbGdEo9C8UAoPsf
v21rIwLKz90nqAdYZSGsoo2T
=3DKWbm
-----END PGP SIGNATURE-----
|