Amanda-Users

Re: last (I hope) chg-zd-mtx question

2003-08-07 14:05:43
Subject: Re: last (I hope) chg-zd-mtx question
From: Jay Lessert <jayl AT accelerant DOT net>
To: "Bruntel, Mitchell L" <mbruntel AT att DOT com>
Date: Thu, 7 Aug 2003 11:01:50 -0700
On Thu, Aug 07, 2003 at 08:12:09AM -0500, Bruntel, Mitchell L wrote:
> --Jay said---> ...In addition, you'll be less likely
> to get surprised down the road if you run the chg-zd-mtx installed
> in libexec.  Your copy in DailySet1 won't be updated (by) 'make install'.
> 
> So you're saying that since the chg-zd-mtx in libexec is the one that
> would be updated when I upgrade and do a Make Install,  THAT is the
> one I should modify to make my "config file"?

No.  I'm saying when you're running chg-zd-mtx for debugging purposes,
you should run the exact one you're going to run in production,
libexec/chg-zd-mtx.

> That's the part that confuses me.

Don't get hung up on "copying chg-zd-mtx to make my config file".  The
config file is just a short little ascii file where all the lines
either look like:

# this is a comment

or

parameter=value

That's all.  The format is documented as comments in a shell script,
instead of in a man page, and that has confused you a little.

> and 
> we have the configuration version which is ../configname/chg-zd-mtx.conf  
>       (in this case /usr/local/etc/amanda/DailySet1/chg-zd-mtx.conf  
> 
>               which as an aside DOES not get called chg-zd-mtx.conf (but just 
> ...mtx) 
>               in the amanda.conf line that calls the changerfile variable.)

Yes!  As the comments in chg-zd-mtx say, it uses changerfile as a root, and then
adds:

    .conf       For the config file
    -slot       For current slot number
    -barcodes   For barcode-label-to-amanda-label mapping

and so on.

> And you're saying that when I make a new version the make install will NOT 
> overwrite the one in
>       /usr/local/etc/amanda/DailySet1/chg-zd-mtx.conf  ... which makes 
> sense...

Correct.

> But then...That isn't the one that actually executes anyway... 

Correct.  It is *just* a config file.

>       The Configuration for DailySet1 goes in 
>       /usr/local/etc/amanda/DailySet1/chg-zd-mtx.conf 

The chg-zd-mtx configuration, yes.

>       But (In my case??!  I also have a file in my config directory called 
>       chg-zd-mtx.conf, as WELL as the executable in the libexec directory.
> (directory shows:
> -rwxr-xr-x   1 amanda   operator   36419 Aug  6 15:58 
> /usr/local/etc/amanda/DailySet1/chg-zd-mtx

Get rid of this one, it is confusing you.

> -rw-r--r--   1 amanda   operator    1631 Aug  6 16:23 
> /usr/local/etc/amanda/DailySet1/chg-zd-mtx.conf

This is the config file corresponding to
'changerfile /usr/local/etc/amanda/DailySet1/chg-zd-mtx'.

> -rwxr-xr-x   1 amanda   operator   36526 Jul 10 12:34 
> /usr/local/libexec/chg-zd-mtx

This is the chg-zd-mtx executable.

> So, are we saying :
>       that the chg-zd-mtx in the CONFIG directory should NOT exist?  or what 
> exactly are we saying here? 

Correct.

> OK: Question in plain English (I hope):
> -----
> a) does a file named chg-zd-mtx need to exist in the CONFIG directory
>   (I am guessing answer is NO...)

Correct, the answer is no.

> b) should we have to edit the chg-zd-mtx file (except to change the
>    stuff in beginning of the file as configuration parameters?

What you might do in your case is cut and paste the configuration comments
from libexec/chg-zd-mtx to create DailySet1/chg-zd-mtx.conf.

> c) IF we DO have to edit the chg-zd-mtx file (not the chg-zd-mtx.conf
     file in DailySet1) where should we keep it so that future changes can
     be accomadated if we need to do another make install?

There should be no reason to edit chg-zd-mtx unless you are fixing a bug
in the shell script.  In that case, you should probably edit
changer-src/chg-zd-mtx.sh.in and re-run make; make install.

> d) for future versions.  Can this be modified so that a sample
>    chg-zd-mtx.conf file is included that DOES NOT contain the shell script
>    stuff?  It seems very confusing.

I'm sure good contributions would be gratefully accepted.  For me, I'm
not sure how much you can improve on:

    # Here is a commented out example file with all the variables and showing
    # their default value (if any):

But that's just me.

> e) For Newbies (PAY ATTENTION NOW)  interested in using a changer
>    file that ISN'T standard*.

I'm not sure what that means.   There is no standard changer file.

>       Would the procedure to follow be:
>       1) locate the changer file desired (for example: chg-zd-mtx)
>          from the changer-src directory in the distribution,

Fine.

>       2) Copy that file to /usr/local/etc/amanda/DailySet1/chg-zd-mtx.conf
>               (that's CONFIG Directory/changername with a .conf at the end of 
> it) 

Rather, you should decide what you want to name your changer config
(I'm fond of <configdir>/changer.conf, myself), and write it with your
favorite text editor, using all the embedded comments in chg-zd-mtx.conf
as a guide.

>               (EXAMPLE:  COPY  /usr/local/libexec/chg-zd-mtx 
> /usr/local/etc/amanda/DailySet1/chg-zd-mtx.conf
>       3) and simply change the variables in the beginning of the file, and 
> STOP editing the file when it says
>               
> ################################################################################
>               # No user-level customization should be required beyond this 
> point.
>               
> ################################################################################
>       (and then delete all lines after that in the 
> /usr/local/etc/amanda/DailySet1/chg-zd-mtx.conf CONFIG file

You could do that, but then you've got a 200-line file with 10 lines of
content, so don't.  :-)

-- 
Jay Lessert                               jay_lessert AT accelerant DOT net
Accelerant Networks Inc.                       (voice)1.503.439.3461
Beaverton OR, USA                                (fax)1.503.466.9472

<Prev in Thread] Current Thread [Next in Thread>