Re: recurring problems with mirrors
Hugues Talbot <Hugues.Talbot@cmis.CSIRO.AU> writes:
>how about a small shell script that checks the integrity of a distribution:
Excellent idea. I had to change "md5" to "md5sum". I also changed
the script to accept a single argument - the starting directory. That
way, the md5 files do not have to be written into the starting
directory. The script can then be used to check without having write
permissions, or even when the mirror is mounted read-only. My changes
are attached.
- Jim Van Zandt
--- check-distribution.orig Tue Feb 3 21:47:03 1998
+++ check-distribution Tue Feb 3 21:48:47 1998
@@ -13,7 +13,9 @@
# stage 1: get the md5 signatures of all the files in the
# distribution
echo "Stage 1"
-find . -type f -exec md5 {} \; > alist.md5
+where=$1
+if [ "$1" == "" ]; then where=. ; fi
+find $where -type f -exec md5sum {} \; > alist.md5
#restricts to the debian packages
egrep "\.deb" alist.md5 > unsorted.md5
@@ -28,7 +30,7 @@
cat /dev/null > faultysigs.md5
for sigs in `cat allsigs.md5`
do
- line=`grep $sigs Packages`
+ line=`grep $sigs $where/Packages`
if [ "$line" = "" ]; then
# echo $sigs
echo $sigs >> faultysigs.md5
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: