>...  When I try to run amtape show I get 
>errors.  Below is a dump of the logs from /tmp.  Any thoughts from anyone?

The "currently loaded slot = -1" seems to imply no tape is currently
loaded, which "-slot current" does not appear to be handling.  In theory,
it should have seen the "-1" and used "firstslot" from your config file.

The chg-zd-mtx script went through a large revision not long ago, so
it's hard to know exactly what version you have.  The debug file you
quoted implies 2.4.2p2, but you said you were using 2.4.2.

Here are a couple of suggestions:

  * See if you have this line in the comments at the start of the file:

      Modified by Jason Hollinden <[EMAIL PROTECTED]> on 13-Feb-2001

    That would indicate you have the latest version.  If you don't have
    this version, get 2.4.2p2 from SourceForge and unpack it, then copy
    just the chg-zd-mtx.sh.in file from it into whatever sources you're
    working from (you might want to save the original, "just in case" :-).
    Then "make" and "make install" to put it in place.

  * Try "amtape DailySet1 reset" and look at the changer debug file.
    It should have a message like this:

      RESET -> loading tape from 1st slot ($firstslot) to $tape

    so you'll be able to see what firstslot is set to inside the
    script.

    BTW, you probably should *not* put that trailing slash on the config
    name.  It's not needed, and I've seen cases (can't remember where)
    recently where using the trailing slash on a directory name led
    to problems.

  * Add these lines at the start of the script:

      exec 2> /tmp/chg-zd-mtx.$$
      set -x

    Find the loadslot() function and add the "set -x" to it as well.

    This will log a trace of all the statements to the file in /tmp and
    hopefully we can see which one caused the "unary operator expected"
    error, although I suspect it's related to the firstslot problem.

>And changer.conf
>
>firstslot=0             #### 1st tape slot
>lastslot=7             #### Last tape slot
>cleanslot=7             #### Slot with cleaner tape

This probably isn't related to your current problem, but I don't think
you want lastslot to be 7.  It should be the last slot that has a "real"
tape in it.  Slot 7 (apparently) has your cleaning tape, so lastslot
should (I think) be 6.

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

Reply via email to