Networker

Re: [Networker] Problem with depositing tapes

2002-08-29 05:15:12
Subject: Re: [Networker] Problem with depositing tapes
From: Davina Treiber <treiber AT HOTPOP DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Thu, 29 Aug 2002 05:18:19 -0400
Stan,

Here is the script I promised using the -v option. It's simple and
straightforward.

D.

#!/bin/ksh

# Script to deposit tapes into the jukebox
# Author Davina Treiber.
# The nsrjb -d command does all that is necessary to deposit tapes with no
# further parameters. The complication is that the tapes need to be
# inventoried after depositing. By using the -v parameter, the list of
# slots deposited into can be obtained. This list may include some empty
# slots from empty CAP slots, but this does not cause a problem.

# Deposit any/all tapes
echo "Depositing tapes from CAP"
SLOTS=$(nsrjb -d -v 2>&1 |grep "^box_deposit: slot " | cut -d\` -f2 | cut -
d\' -f1)

# SLOTS now contains a list of slots which may have had tapes deposited
# into them in the above operation. Some of these slots may be empty, this
# is not a problem.
for S in $SLOTS; do
 echo "Inventorying tape in JB slot $S"
 # The inventory command below also updates the location field
 nsrjb -IE -S $S
done

--
Note: To sign off this list, send a "signoff" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=