On Tue, Feb 01, 2011 at 09:50:55PM +0330, Amir Pakdel wrote: > Hi Gonéri, > On 01/26/2011 04:00 PM, Gonéri Le Bouder wrote: > >On Wed, Jan 26, 2011 at 02:49:50PM +0330, Amir Pakdel wrote:
> >I suggest to create a 100+ characters lenght file somewhere in the > >fusioninventory-agent_hpux_11.23-IA64_2.1.7-2 directory and add a check > >in the fusioninventory-agent. If this file is missing, we will print a > >warning. > It is feasible, but everyone that wants to use the prebuilt > FusionInventory package for HP-UX will get the error; therefor, the > prebuilt agent would not work for them. > However, there is an easier way to detect this failure: When the > "tar" encounters such a situation, it creates a file named > "@LongLink" which contains the name of the file that it could not > create. the @LongLink file is in the current directory, so if the guy do tar xf XXXXXX.tar.gz mv XXXXXXX /somewhere the @LongLink file will be lost. Another option is to use another compression format. > >>>So now, you can easily give a try to the last stable snapshot now :) > >>>http://prebuilt.fusioninventory.org/devel/2.1.x/hpux_11.23-IA64/ > It works well. It added my test HP-UX server to my OCS/FusInv > server, and except the Processor, all the information seems OK. > These are the exact sequence of commands that I have executed: > # On my Linux desktop: > wget > 'http://prebuilt.fusioninventory.org/devel/2.1.x/hpux_11.23-IA64/fusioninventory-agent_hpux_11.23-IA64_2.1.7+dev-2.1.x-20110201-1654.tar.gz' > tar xzvf > fusioninventory-agent_hpux_11.23-IA64_2.1.7+dev-2.1.x-20110201-1654.tar.gz > mv fusioninventory-agent_hpux_11.23-IA64_2.1.7+dev-2.1.x-20110201-1654 FI-a > tar czvf fusioninventory-agent_hpux_11.23-IA64_2.1.7+dev.tar.gz FI-a > scp fusioninventory-agent_hpux_11.23-IA64_2.1.7+dev.tar.gz > root@testhpux:/tmp > ssh root@testhpux > # The rest is on the test HP-UX server > cd /tmp > gunzip fusioninventory-agent_hpux_11.23-IA64_2.1.7+dev.tar.gz > rm @LongLink > tar xvf fusioninventory-agent_hpux_11.23-IA64_2.1.7+dev.tar > cat @LongLink ; echo > # Showed > FI-a/perl/lib/site_perl/5.12.1/FusionInventory/Agent/Task/NetDiscovery/Manufacturer/HewlettPackard.pm > cd FI-a > ./fusioninventory-agent --server=http://ocs/ocsinventory > #Got the following output on the screen: > [info] Inventory saved in /tmp/basahpux-2010-07-14-16-30-00.ocs > Undefined subroutine > &FusionInventory::Agent::Task::NetDiscovery::main called at -e line > 1. > Undefined subroutine > &FusionInventory::Agent::Task::NetDiscovery::main called at -e line > 1. Ok so even if we rename the Fusioninventory directory, this won't fix the issue. Another option, we can put a tarball instead of the tarball and use the fusioninventory-agent script to extract it with gtar. I think this will be the best solution. What's the common location of gtar on HP-UX? > >>>Amir, for the record, I applied 2 small commits for HP-UX on the agent > >>>in the 2.1.x branch. > >>>https://github.com/fusinv/fusioninventory-agent/commit/fce6c94ad435a28f7ae444957298df1ef3ee8de4 > >>>https://github.com/fusinv/fusioninventory-agent/commit/cadc3f5570066502d18129f028bd549e6310aaf3 > Since they are included in the 2.1.x prebuilt package that I tested > (available at > http://prebuilt.fusioninventory.org/devel/2.1.x/hpux_11.23-IA64/) I > would say that they cause some kind of problem on the HP-UX systems > that I have here, because Processor information were not correct. > I will submit a patch as soon as possible. Cool, > >>>In order to avoid surprise, I also started a test-suite for HP-UX CPU > >>>detection here: > >>>https://github.com/fusinv/fusioninventory-agent/commit/3d0662a7e57b8debaee4bd97e8b73e51cb6ef46f > >>> > >>>The test script parses machinfo (/usr/contrib/bin/machinfo ) output > >>>to get CPU info. If possible, > >>>can you send me this command output, I will add them. > The output of machinfo is attached. Thank you. http://forge.fusioninventory.org/projects/fusioninventory-agent/repository/revisions/ab8c918189075b329ec3416f01338b652bd5d226/diff > One more thing: > > - df command of HP-UX does not support -m option, which is used in > FusionInventory/Agent/Task/OcsDeploy.pm; however, it does not cause any fatal > error, but it should be replace with -k which reports free space in kilobytes. > I have changed > perl/lib/site_perl/5.12.1/FusionInventory/Agent/Task/OcsDeploy.pm of the > prebuilt package in > http://prebuilt.fusioninventory.org/devel/2.1.x/hpux_11.23-IA64/ as > following, and it works on Linux and HP-UX: > # diff > perl/lib/site_perl/5.12.1/FusionInventory/Agent/Task/OcsDeploy.pm{.orig,} Thank you again http://forge.fusioninventory.org/projects/fusioninventory-agent-task-ocsdeploy/repository/revisions/7f58dbe0dff61beacfdb5daff04af0191b0aee0e/diff I've the feeling this will work on Solaris too :) Cheers, Gonéri Le Bouder
signature.asc
Description: Digital signature
_______________________________________________ Fusioninventory-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-devel
