Re: Feature Request: eject option for amflush
2003-05-14 10:43:42
On Wed, May 14, 2003 at 11:29:09AM +0200, Nicki Messerschmidt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> I think an eject option for amflush would be a very useful thing,
> because one cant do somethin like
> amdump; mt -f /dev/nst0 offline
> because amflush does some asking an then exits. An I don't like to wait
> for the tape to be rewinded and then ejected. How do you think about it?
I suppose you mean by the last line that you don't like to
physically sit there waiting.
As a workaround I think a little shell script would work.
scan the ps command output for the amflush program
extract the process id number (PID)
(solaris has a 'pgrep amflush' command for these steps)
use wait PID to let the script pause til amflush completes
maybe put in a sleep for some extra time if needed
issue your mt offline command (maybe an mt rewind first?)
You could run this in the background after the amflush returns
control to your terminal. And if you do it as "nohup <your script> &"
you can log off.
--
Jon H. LaBadie jon AT jgcomp DOT com
JG Computing
4455 Province Line Road (609) 252-0159
Princeton, NJ 08540-4322 (609) 683-7220 (fax)
|
|
|