Operating System - HP-UX
1833776 Members
2117 Online
110063 Solutions
New Discussion

Non-interactive frecover for scripted recoveries?

 
Matthew Gwin
Occasional Advisor

Non-interactive frecover for scripted recoveries?

Hi all,

I'm writing a script that automatically recovers a certain file from tape to check a value before continuing.

It works fine unless there isn't a tape in the drive, in which case the script hangs because its waiting for a response to:

frecover(5405): unable to open /dev/rmt/0m
frecover(5406): Do you wish to continue? (^[yY]/^[nN])

Since the script runs without supervision, how can this prompt be turned off, or automatically answer "No" to all prompts? I've tried the -y option (which answers "Yes" to everything), but that ends up hanging on an "Insert next volume and press Enter" prompt.

I couldn't find any options for answering "No" to all prompts.

TIA,

Matthew
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: Non-interactive frecover for scripted recoveries?

Hi Matthew:

If you wish to use 'yes()' do:

# yes n

See the manpages for 'yes(1)'.

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Non-interactive frecover for scripted recoveries?

Have you tried redirecting stdin to /dev/null?
(Make sure you test this to see it doesn't get into a loop.)