"John R. Jackson" <[EMAIL PROTECTED]> writes:
> >There is no tape in the tape drive - should I put one in or will
> >this abort by itself - eventually? or - should I just Ctrl c? Ctrl
> >d? 
> >...
> It will not abort by itself (hadn't thought of that), so you'll
> either need to give it a tape (even a bad one) or abort it.

I ran into this a while ago, and patched amverify to query the drive
20 times, with 3 seconds between each (the 3 seconds was already
there), which gives a 1-minute timeout.

And yes, I should have sent this before.  :)

--- server-src/amverify.sh.in.orig	Thu Jun 22 15:40:58 2000
+++ server-src/amverify.sh.in	Thu Jun 22 16:41:58 2000
@@ -326,6 +326,8 @@
 # ----------------------------------------------------------------------------
 
 while [ $SLOT -lt $SLOTS ]; do
+	TIMER=0
+	ERRORS=0
 	SLOT=`expr $SLOT + 1`
 	#
 	# Tape Changer: dial slot
@@ -347,7 +349,14 @@
 	$Echon "Waiting for device to go ready..."
 	until eval $DEVICE_READY >/dev/null 2>&1; do
 		sleep 3
+		TIMER=`expr $TIMER + 1`
+		[ $TIMER -gt 20 ] \
+			&& report "Tape device not ready" \
+			&& ERRORS=1 \
+			&& break
 	done
+	[ $ERRORS -gt 0 ] \
+		&& continue
 	$Echon "Rewinding..."
 	until $MT $MTOPT $DEVICE rewind; do
 		sleep 3
@@ -376,7 +385,6 @@
 		sleep 3
 	done
 	ERG=0
-	ERRORS=0
 	while [ $ERG = 0 ]; do
 		if [ $Echon = echon ]; then
 			$Echon "Waiting for device to go ready..."

-- 
Espen H Wiborg <[EMAIL PROTECTED]>
99 little bugs in the code, 99 bugs in the code,
fix one bug, compile it again, 101 little bugs in the code.

Reply via email to