Expect scripts, especially an expect backup script.

From: MacDonell, Dennis <DennisMacDonell_at_auslig.gov.au>
Date: Tue, 04 Dec 2001 18:29:58 +1100

Hi,

I'm trying to write an expect script to control an autochanger tape device.
At the moment I have have a script that can change the tapes. I also have a
script that will backup some stuff to a tape. However at the moment I have
not been able to marry the 2 scripts together to enable me to load another
tape when vdump hits the end-of-tape marker. Theoretically it should have
worked, but for some reason the "Change Tapes" string was not detected, and
the process seemed to want to continue processing to the same tape.

I thought if I could get some real live examples of expect scripts, I might
be able to sort out what is going wrong.

Here are the messages that were captured by the log file:
vdump: Change Tapes: Mount tape# 0002
vdump: can't open device file </dev/ntape/tape4_d1>; not ready

There is something basically wrong with these messages -
(a) I would of thought vdump should have put out a message of the form
   Press return when the next tape is loaded.
instead of reporting "can't open device file"
(b) It would appear that vdump has tried to access the tape before waiting
for the next tape to be loaded.

Dennis

######################################
Dennis Macdonell
Systems Administrator
National Mapping Division, Geoscience Australia
mail: PO Box 2, Belconnen, ACT 2617
email: mcdonell_at_auslig.gov.au
ph: 61 2 6201 4326
fax: 61 2 6201 4377
######################################
Received on Tue Dec 04 2001 - 07:31:19 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT