Solaris10x86 - How to update besclient.config

(imported topic written by PaulClaridge91)

Hi,

I am trying to automate some additional client settings by editing the /var/opt/BESClient/besclient.config file.

We install the client code and specify some relays form an OS build image.

I then use a perl script to copy the original file to besclient.config.last and attempt to write a new file besclient.config with my additional settings inserted eg

Software\BigFix\EnterpriseClient\Settings\Client\Infrastructure

value = Incoming

becomes

Software\BigFix\EnterpriseClient\Settings\Client\Capability

value = TD3

Software\BigFix\EnterpriseClient\Settings\Client\Environment

value = ‘.$Environment.’

Software\BigFix\EnterpriseClient\Settings\Client\Infrastructure

value = Transactions%20FX

Software\BigFix\EnterpriseClient\Settings\Client\Logical Asset

value = P2PS

Software\BigFix\EnterpriseClient\Settings\Client\Region

value = ‘.$Region.’

Software\BigFix\EnterpriseClient\Settings\Client\Country

value = ‘.$Country.’

Software\BigFix\EnterpriseClient\Settings\Client\City

value = ‘.$City.’

Software\BigFix\EnterpriseClient\Settings\Client\Building

value = ‘.$Building.’

with appropriate values substituted.

However, the update doesn’t appear, even though my perl script reports no errors.

I have noticed a besclient.config.tmp appear as the server tries to update the target (I assume) so before doing my edit I stop the service (/etc/rc2.d/S99BESClient stop). I then save and recreate the file with my insertions before restarting the service (/etc/rc2.d/S99BESClient start).

I’m stumped. Perhaps there is some other locking or cache I am not aware of? Or can you suggest a better way of automating these updates please? (Having operators do it manually on the server is not an option!)

Many thanks, Paul Claridge

(imported comment written by BenKus)

Is it that the settings are not reflected or is the file being re-written by the agent? What if you change a client setting after you run your script?

Ben