Re: Ontape -s , multiple tapes & cron.
Posted in 1998
Oh, this is a good idea. I'm not sure about the expect-script you mentioned,
but can we do this way:
make a named pipe 'pipefile' and a shell script 'ontape_agent':
# filename: ontape_agent
read x
ln -s /dev/rmt/0m /dev/ArchTape
echo
read x
ln -s /dev/rmt/1m /dev/ArchTape
echo
then we do this
sleep 100 >pipefile &
ontape_agent <pipefile | ontape -s | tee pipefile
Ken
Jacob Salomon wrote in message <34C7D6BC.990E1A4A@garpac.com>...
>
>Here's how I distill your needs:
>
>1. Your TAPEDEV is a link like /dev/ArchTape, which is really a link to
> anything you want it to be.
>
>2. You do not start ontape directly. You run it as an "expect" script.
> Before running ontape, the expect-script sets the link /dev/ArchTape
> to be /dev/rmt0.
>
>3. The script starts ontape and awaits the prompt to "press RETURN to
> continue". When it gets the prompt, it simulates the key-press.
>
>4. When it receives the prompt to mount the next tape on /dev/ArchTape
> and press RETURN when ready (I don't recall the exact wording) the
> script switches the link to /dev/rmt1 and simulates the pressed key.