[Fusioninventory-devel] remote execution of the agent

Gonéri Le Bouder goneri at rulezlan.org
Sun May 30 22:48:36 UTC 2010


2010/5/30 Pakdel Amir <a.pakdel at karafarinbank.net>:
> Hi Gonéri,
> Hello dear FusionInventory developers
>
> Implementation of that remote execution thing that we have discussed earlier, is much more difficult than I thought!
> because I have to find a way to change behavior of "Back quote" to execute commands remotely!
Yes, like we do for can_run() or can_load(), I tihink we can create a
function to run code. This function will have to
decide is the command need to be launch through ssh or locally.

foreach(`dmidecode`) {

should be replaced by:

foreach (run_cmd('dmidecode')) {

> Consequently, I think that the easiest way would be using "tools/build-perl-tree.sh" as following:
> 1. generating a package (preferably a compressed one)
> 2. copying it over to the server (using scp)
> 3. decompressing the package
> 3. executing the FusionInventory and gathering the information
> 4. removing the FusionInventory from the server
Indeed, it's a way more simple option. Today the build-perl-tree.sh
script generate a tarball with a fresh
perl tree with the perl binaries and the dependencies. The idea is to
store these tarballs on a factory
and merge their content with a fresh git tree of the agent every days
to be able to provide up to date agent
easy to run.
The build-perl-tree.sh script to be finished. It only works on Linux
for now. I know if generate a broken perl
binary with a wrong @INC on MacOSX. I've to fix that.
We need to create the script that will merge the tarballs but it's not
a big deal.

So IMO, the two options are fine :)
-- 
     Gonéri Le Bouder



More information about the Fusioninventory-devel mailing list