Amanda-Users

Re: Newbie: amlabel: could not load slot "current": changerfile must be specified in amanda.conf

2005-04-11 23:26:46
Subject: Re: Newbie: amlabel: could not load slot "current": changerfile must be specified in amanda.conf
From: "Jesus Salvo Jr." <jesus.salvo AT communicator.com DOT au>
To: amanda-users AT amanda DOT org
Date: Tue, 12 Apr 2005 13:19:52 +1000
On Tuesday 12 April 2005 13:07, Jesus Salvo Jr. wrote:
> I think I know what the problem maybe, though I do not know the solution:
>
> The test that I did with chg-zd-mtx works only if I run it in
> the /usr/local/etc/amanda/Daily directory.
>
> If I do it anywhere else, I get the exact same error as amtape does:
>
> bash-2.05$ pwd
> /export/home/amanda
> bash-2.05$ /usr/local/libexec/chg-zd-mtx -reset
> <none> changerfile must be specified in amanda.conf
>
> bash-2.05$ set | grep PATH
> LD_LIBRARY_PATH=:/usr/local/lib
> MANPATH=:/usr/local/man
> PATH=/usr/bin::/usr/local/bin:/usr/local/sbin:/usr/local/libexec
>
> Based on changer.c, amtape simply exec / calls chg-zd-mtx, so the error is
> the same.
>
> What must I do so that chg-zd-mtx will work from any directory ?
> I must have missed a very simple step.
>

More info:

I changed chg-zd-mtx so that I added an echo line just before it calls 
amgetconf:

echo "amgetconf$SUF changerfile"
changerfile=`amgetconf$SUF changerfile 2>/dev/null | grep -v BUGGY`
if [ -z "$changerfile" ]; then
        Exit 2 \
             "<none>" \
             "changerfile must be specified in amanda.conf"
fi

... and here is the output:

bash-2.05$ /usr/local/libexec/chg-zd-mtx -reset
amgetconf changerfile
<none> changerfile must be specified in amanda.conf

So chg-zd-mtx script does not pass the <config> parameter to any of the am* 
executables, including amgetconf. Thus, amgetconf called from within 
chg-zd-mtx only works from within the directory containing the amanda.conf 
file.

Anyway to resolve this without modifying the changer script ?


Thanks,

John