#!/bin/sh

err=0
while read digest file; do
	if [ -f $file ]; then
		md5=`md5 < $file.noipv6`
		if [ "$digest" != "$md5" ]; then
			echo "warning: bad MD5 for $file"
			err=1
		fi
	else
		if [ "$digest" != "00000000000000000000000000000000" ]; then
			echo "error: $file not found"
			err=1
		fi
	fi
done
if [ $err = 0 ]; then
	echo "no errors"
fi
exit $err
