Koozali.org: home of the SME Server

[Announce] Inventory tools: OCS and GLPI for SME 7.x

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #30 on: November 03, 2007, 06:41:19 PM »

No, in a rpm, the scripts must be non-interactive, but you could dump the bases just before dropping them, just like a signal-event pre-backup would do

mysqldump --add-drop-tables dbname > /home/e-smith/db/mysql/dbname.dump

this way, if you install an upgraded version, the script could check if the dump exists, if it do, then, just create the database and fill it like this:

mysql dbname < /home/e-smith/db/mysql/dbname.dump

If it doesn't exists, that means it's a new install, sso just fill it with the default values. Just an idea.
You can differentiate in the spec file between an removal because of an upgrade or a final removal (uninstall) I will have to lookup how the scripts have to be coded to have this feature, you can find the explanation here.

If I remember correctly you should be able to check arguments in a spec file like this:
Code: [Select]
if [ $? -eq 0 ]; then
instructions here when condition is met
else
instructions here when condition is not met
fi

BTW This is a typical question to ask on the devinfo mailinglist.
« Last Edit: November 03, 2007, 06:42:59 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #31 on: November 03, 2007, 07:16:04 PM »
Hi,

It's been some time this answer was posted...
I now use this test on %preun and %postun
Code: [Select]
if [ $1 = 0 ] ; then

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #32 on: November 03, 2007, 11:32:15 PM »
Hi Silvain,

I had to install those 3 rpms from dependencies.tar.gz file... and everything started to work.

BUT

I have lost my data... even using --noscripts as an option!
Not a problem at all... just testing... but may create a problem to someone else... so be warned.

Jáder
...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #33 on: November 03, 2007, 11:38:45 PM »
Hi,

That's weird because the database is not imported if you update...
Could you be more precise on the context?

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #34 on: November 04, 2007, 12:16:51 AM »
Sylvain

I can provide any information you request... but you need to tell me how to provide it! :)

I just follow your HowTo from Wiki... but remember I have older versions installed!

Jáder
...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #35 on: November 04, 2007, 12:36:13 AM »
Hi,

Contact me via MSN or PM...
By the way, you should have a backup of your old install in /opt/RPM_BACKUP

Offline luca219

  • ***
  • 80
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #36 on: November 06, 2007, 11:27:33 AM »

thanks  :-P :-P
« Last Edit: November 06, 2007, 11:30:20 AM by luca219 »

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #37 on: November 06, 2007, 12:28:04 PM »
Hi,

Contact me via MSN or PM...
This might benefit one user, but for future refference it would be nice if all information would be in the forums (as well).
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #38 on: November 06, 2007, 12:29:25 PM »
Removed content, because as this was posted twice.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #39 on: November 06, 2007, 12:42:11 PM »
Quote
Quote from: cool34000 on 03 November 2007, 19:36:13
Hi,

Contact me via MSN or PM...
This might benefit one user, but for future refference it would be nice if all information would be in the forums (as well).

Just to let everyone know: I´ve been working with Cool34000 to get OCS/GLPI contrib working.
When Cool34000 ask me to talk privately to him, was because we could discuss without trash the thread.

My environment is ALMOST like a test env... so something could be wrong on my side.
BUT wasn´t  my fault... I´ve got a bug... discovered and corrected by Cool3400 (Thank you!).
The latest version available is "jader-proof" ! :)


Jáder
...

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #40 on: November 06, 2007, 12:48:58 PM »
Hi Cactus.


You're right! Sorry for not posting results here...
After all our tests, all was OK so this was a user issue due to lack of documentation. Look on the activity of the Wiki article, it has been updated many times!
And it still needs to be expanded!

This work is still in progress anyway, I'm uploading right now a new version (1-3).
The deployment function still doesn't work. See also the Talk page.

More information on the Wiki

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #41 on: November 06, 2007, 12:56:33 PM »
Hi Cactus.


You're right! Sorry for not posting results here...
After all our tests, all was OK so this was a user issue due to lack of documentation. Look on the activity of the Wiki article, it has been updated many times!
And it still needs to be expanded!
I noticed indeed, keep up the good work. Perhaps it is worth mentioning on the top of the article that it is not complete (yet), using the {{Incomplete}} template in the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #42 on: November 06, 2007, 08:36:51 PM »
Hi!

New RPM released (1-4).
This RPM fixes the missing ParserDetails.ini file of perl module XML::SAX on SME 7.2
The wiki has been updated as well ;)

Offline thomasch

  • *
  • 232
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #43 on: November 07, 2007, 09:12:57 AM »
Hi,

Updated the wiki pages... Enjoy!
http://wiki.contribs.org/OCS_Reports_and_GLPI

I notice in the wiki page that the OCS deployment module is 'not working' yet.

I don't have access to edit the wiki (registration not answered) so I have to share to you in this forum :

What you need is to put server certificate file in each client computer in the same directory with with ocsagent
OCS use CACert but you don't have to apply cacert.. you can use certificate already installed in you smeserver .

he is a simple howto :

ssh to your smeserver then do this
Code: [Select]
cat /etc/httpd/conf/httpd.conf |grep .crt
in my smeserver the output is
Code: [Select]
SSLCertificateFile /home/e-smith/ssl.crt/smeserver.smeserver.local.crt
then
Code: [Select]
cp /home/e-smith/ssl.crt/smeserver.smeserver.local.crt cacert.pem
copy cacert.pem to C:\Program Files\OCS Inventory Agent

don't forget to Build And Activate the Package in OCS

good luck

Offline cool34000

  • *
  • 339
  • +0/-0
Re: [Announce] Inventory tools: OCS and GLPI for SME 7.x
« Reply #44 on: November 07, 2007, 12:13:48 PM »
Hi,


Thanks a lot for your answer thomasch!
Yes, we need the cacert.pem but we were focussing on the warning we're having when activating a package.
It seems that this is not a problem... Stefen Noble has given a quick howto in the Talk page

I will integrate this improvement in the next RPM.
Please ask again for Wiki access to the dev-team, and if you can write some doc about the deployment feature that would be perfect!


Regards,
Sylvain