Xymon Mailing List Archive search

External Client scripts and MACHINE environment

list Henrik Størner
Fri, 18 Nov 2005 07:57:07 +0100
Message-Id: <user-dcefd3b9fb9b@xymon.invalid>

On Thu, Nov 17, 2005 at 07:45:24PM -0500, Asif Iqbal wrote:
I just started using bb-cpu2[1] on ~hobbit/client/ext of version 4.1.2.
I am noticing it $MACHINE has no value inside the script while I run a
test like this
	./bin/bbcmd sh -x ~hobbit/client/ext/bb-cpu2.sh
It *is* set when you run the script as a client extension, because 
$MACHINE is set by the "runclient.sh" script that starts up the client.
It sets these: MACHINE MACHINEDOTS BBOSTYPE HOBBITCLIENTHOME

But it would be nice if you could test client scripts just with bbcmd.
I'll see if I can make bbcmd pick up default settings for the
MACHINE, MACHINEDOTS and BBOSTYPE settings. Meanwhile, you can test
your script with

HOBBITCLIENTHOME=`pwd` \
MACHINEDOTS=my.local.hostname \
MACHINE=my,local,hostname \
BBOSTYPE=linux \
./bin/bbcmd --env=/usr/lib/hobbit/client/etc/hobbitclient.cfg \
-x ~hobbit/client/ext/bb-cpu2.sh


Henrik