Hi,

On 3/3/2007 10:46 AM, Holden Hao wrote:
> Hi all.
> 
> I am using Phil Stracchino's checkhost script in my "RunBeforeJob"
> directive as follows:
> 
> RunBeforeJOb ="/path/to/script/checkhost %c"
> 
> %c is Bacula's variable for the client name but my client name is
> different from my client's host address as you can see from my example
> below:
> 
> 
> Client {
>   Name = ws00001-fd
>   Address = ws00001
>   FDPort = 9102
>   Catalog = MyCatalog
>   Password = "secret"
>   File Retention = 30 days
>   Job Retention = 6 months
>   AutoPrune = yes
> Maximum Concurrent Jobs = 4
> }
> 
> %c translates into ws00001-fd and not ws00001 which is the clients hostname.
> 
> Is there a variable in Bacula that I could use that will translate
> into the client's host address instead of just its name?  I can
> correct my problem by using aliases in my hosts file or my DNS server
> but I still would want to know if such a variable exists.  I looked in
> the manual and it seems not to be there.

There is no variable representing the address, as far as I know.

But, it your client names are always `hostname`-fd you might add a 
simple substitution to the script (which I did not even look at now :-)

Simply remove the trailing -fd or do nothing if there is no trailing 
"-fd" in bash:

 > export NAME=elf-fdtest-fd
 > echo "${NAME/%-fd/}"
elf-fdtest

Something like this works here for me.

Arno

> Thanks.
> 
> 
> Holden
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to