jackburton79 / ocs-agent

Lite inventory agent (compatibile with ocsinventory-ng and glpi)
GNU General Public License v3.0
14 stars 6 forks source link

Thinstation ocsinventory - TAG support #19

Closed piozylka closed 7 years ago

piozylka commented 7 years ago

It seems that thinstation agent doesn't support TAG option which is available at original ocsinventory-agent. Is there any option to send TAG ??

jackburton79 commented 7 years ago

Il 23 giu 2017 10:53 AM, "piozylka" notifications@github.com ha scritto:

It seems that thinstation agent doesn't support TAG option which is available at original ocsinventory-agent. Is there any option to send TAG ??

Hi, at the moment, sending the tag is not supported. Since we dont use it, I did not implement it. I can look into it, if there's need for It.

piozylka commented 7 years ago

It would be great ! Thank you

jackburton79 commented 7 years ago

Just to clarify: you mean the ability to send the TAG (which you can set from the BIOS) from the client to the ocsinventory server ? or to receive the TAG which you set from the ocsinventory server to the client?

piozylka commented 7 years ago

I mean the TAG which u can set in ocsinventory, option -t in original ocsinventory-agent

jackburton79 commented 7 years ago

I implemented tag sending functionality in c95c798c68fcbd293aa828ca8624bec4e1124cf1. I briefly tested and it seems to work, but having never used such functionality in ocsinventory, I can't say if it does what you expect. Could you give it a try ?

piozylka commented 7 years ago

how can i implement this version in thinstation ? thinstation update package is enough for this ?

jackburton79 commented 7 years ago

Currently the Thinstation package points to an old version, so you'd have to do this manually. Which version of Thinstation are you using ? Maybe I could upload an already compiled package.

piozylka commented 7 years ago

i think im using 5.4 where can i check version ?

jackburton79 commented 7 years ago

I think version 5.4 already points to the master of ocsinventory. The Pkgfile of ocsinventory (in ts/ports/packages/ocsinventory) should be like this:

# Description: Thinstation essential package
# URL: http://www.thinstation.org
# Maintainer: Donald A. Cupp Jr. (don cupp jr at ya hoo dot com)

name=ocsinventory
version=git
release=1
source=()

build() {
git clone https://github.com/jackburton79/agent.git
        cd agent
        make
        mkdir -p $PKG/bin
        cp  ocsinventory-agent $PKG/bin/.
}

so I think you just need to:

piozylka commented 7 years ago

Done, package nicely updated, image build done. ocs report is sended but without tag information, tired both manually and via config file. no changes, when i call ocsinventory-agent --help it doesnt show information about -t option, only: -h help -c conf -s server Is this correct ?

jackburton79 commented 7 years ago

Nope, I think it hasn't updated. To be sure, launching the application with the -h switch should show version 1.5.

jackburton79 commented 7 years ago

Could you also remove any .zip or .Tar.gz or tar.xz file present in the above directory ?

jackburton79 commented 7 years ago

And then launch pkgmk -u again

piozylka commented 7 years ago

I was fighting with this all day, here's what I did and my conclusions:

jackburton79 commented 7 years ago

I think it happened to me, too. In that case, I think I manually copied the generated binary (which is compressed into a xz executable) to the package directory in the Thinstation tree (if I remember correctly, that would be ts/build/packages/ocsinventory-ng/bin)

trentasis commented 7 years ago

Try with

pkgmk -u -d -um pkgmk -u pkgmk -uf pkgmk -u update package

2017-07-05 21:43 GMT+02:00 Stefano Ceccherini notifications@github.com:

I think it happened to me, too. In that case, I think I manually copied the generated binary (which is compressed into a xz executable) to the package directory in the Thinstation tree (if I remember correctly, that would be ts/build/packages/ocsinventory-ng/bin)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jackburton79/agent/issues/19#issuecomment-313206107, or mute the thread https://github.com/notifications/unsubscribe-auth/AM316BcAriUJEGU5qLcecks8GCctMsAlks5sK-dZgaJpZM4ODTcm .

piozylka commented 7 years ago

@jackburton79 Indeed I had to manually extract and copy to ts/build/packages/ocsinventory-ng/bin Now it's working but due to bug I cannot test it. @trentasis thx for help, I will try this next time.

jackburton79 commented 7 years ago

In fact didnt work for me either, for an already inventoried machine. Works if I delete the machine and retry to send the inveentory.

Il 06 lug 2017 1:46 PM, "piozylka" notifications@github.com ha scritto:

@jackburton79 https://github.com/jackburton79 Indeed I had to manually extract and copy to ts/build/packages/ocsinventory-ng/bin Now it's working but due to bug https://github.com/OCSInventory-NG/UnixAgent/issues/59 I cannot test it. @trentasis https://github.com/trentasis thx for help, I will try this next time.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jackburton79/agent/issues/19#issuecomment-313373484, or mute the thread https://github.com/notifications/unsubscribe-auth/ADVtz6AYpjQhoIcsGM_5hkpr2Lrjl87Pks5sLMkwgaJpZM4ODTcm .

jackburton79 commented 7 years ago

I'm closing this, since adding the tag while inventorying a new machine works.

piozylka commented 7 years ago

Confirmed, adding new machine works. Thank u , very much.