Imported Upstream version 2.5.2p1
[debian/amanda] / server-src / amverify.sh.in
index 451da620e326402a210325a1c8bc8021def936b8..21e111d4a7ba7441adaa3df6eb82e0465aab003b 100644 (file)
@@ -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..."