Imported Debian patch 2.5.2p1-2
[debian/amanda] / server-src / amverify.sh.in
index 809445131593747b6d1147af25b251694c928ff9..21e111d4a7ba7441adaa3df6eb82e0465aab003b 100644 (file)
@@ -1,6 +1,6 @@
-#! /bin/sh
+#! @SHELL@
 #
-#      $Id: amverify.sh.in,v 1.35 2006/03/16 17:32:32 ktill Exp $
+#      $Id: amverify.sh.in,v 1.38 2006/07/25 19:00:56 martinea Exp $
 #
 # (C) 1996 by ICEM Systems GmbH
 # Author: Axel Zinser (fifi@icem.de)
@@ -64,7 +64,7 @@ report() {
 }
 
 getparm() {
-       $AMGETCONF $CONFIG $1 2>/dev/null | grep -v BUGGY
+       $AMGETCONF $CONFIG $1 2>/dev/null
 }
 
 sendreport() {
@@ -373,8 +373,15 @@ while [ $SLOT -lt $SLOTS ]; do
        fi
        report "Using device $DEVICE"
        $Echon "Waiting for device to go ready..."
-       until eval $DEVICE_READY >/dev/null 2>&1; do
+       count=1800
+       until eval $DEVICE_READY > $TEMP/ammt.out 2>&1; do
+               [ count -lt 0 ] \
+                       && report "Device not ready" \
+                       && report "`cat $TEMP/ammt.out`" \
+                       && report cat $TEMP/ammt.out >> $DEFECTS \
+                       && break;
                sleep 3
+               count=`expr $count - 3`
        done
        $Echon "Rewinding..."
        ERRORS=0
@@ -424,8 +431,15 @@ while [ $SLOT -lt $SLOTS ]; do
                if [ $Echon = echon ]; then
                        $Echon "Waiting for device to go ready..."
                fi
-               until eval $DEVICE_READY >/dev/null 2>&1; do
+               count=1800
+               until eval $DEVICE_READY > $TEMP/ammt.out 2>&1; do
+                       [ count -lt 0 ] \
+                               && report "Device not ready" \
+                               && report "`cat $TEMP/ammt.out`" \
+                               && report cat $TEMP/ammt.out >> $DEFECTS \
+                               && break;
                        sleep 3
+                       count=`expr $count - 3`
                done
                if [ $Echon = echon ]; then
                        $Echon "Reading..."