Alex Whites solution to end of tape recognition in UNIX

usenet usenet at abnjh.UUCP
Sat Mar 10 03:40:00 AEST 1984


Greg Woods says:

>    Regarding keeping exclusive access to a tape drive: we have a program
> here that does it. It runs as three commands: "all", "deall" and "ft". The
> "all" command first checks to make sure no one else has allocated the drive,
> and if not, it chowns all the /dev/mt and /dev/rmt files pertaining to that
> drive to you, and makes them mode 600 (then no one else can read or write
> on that drive). "deall" chowns them back to root and makes them mode 000
> (so that no one can read or write an unallocated drive). The "ft" command
> (for Free Tape) was added later because of course some users forget to
> deallocate. "ft" first checks to see if there are any free drives, and if
> so, it informs you immediately. If not, it checks to see if any of the
> allocated drives have not been read or written in the last 15 minutes,
> and if so, deallocates it and informs you of the now-free drive.
>   This system has been running here since before I came here (over 3 years)
> and we have never had a problem with it (except for the crappy old DEC tape
> drives always breaking! :-)
> 

I like this alot.  particularly the 'ft' command.  It solves the
problem of freeing the drive at logout time without special kernel
hacks.  Moreover, it neatly finnesses all the 'open issues' associated
with background processes that are still active at logout time.

Rick Thomas
ihnp4!abnjh!usenet  or  ihnp4!abnji!rbt



More information about the Comp.unix mailing list