From upstream. http://groups.yahoo.com/group/amanda-hackers/message/4510 --- amanda-2.4.5/server-src/amverify.sh.in.orig 2005-06-08 13:30:11.000000000 -0700 +++ amanda-2.4.5/server-src/amverify.sh.in 2005-06-08 13:32:27.000000000 -0700 @@ -425,14 +425,16 @@ fi RESULT=`$AMRESTORE -h -p $DEVICE 2> $TEMP/amrestore.out \ | doonefile 2> $TEMP/onefile.errors` + # save previous filename to detect looping + FILE_prev="$FILE" FILE=`grep restoring $TEMP/amrestore.out \ | sed 's/^.*restoring //'` EOF=`grep "reached end of tape" $TEMP/amrestore.out` EOI=`grep "reached end of information" $TEMP/amrestore.out` # amrestore: 0: restoring sundae._mnt_sol1_usr.19961127.1 - if [ X"$FILE" != X"" -a X"$RESULT" = X"0" ]; then + if [ X"$FILE" != X"" -a X"$FILE" != X"$FILE_prev" -a X"$RESULT" = X"0" ]; then report "Checked $FILE" - elif [ X"$FILE" != X"" -a X"$RESULT" = X"999" ]; then + elif [ X"$FILE" != X"" -a X"$FILE" != X"$FILE_prev" -a X"$RESULT" = X"999" ]; then report "Skipped $FILE (`cat $TEMP/errors`)" elif [ -n "$EOF" ]; then report "End-of-Tape detected."