Afdrukken
Hits: 4731

Unfortunatly SMT version 1.1 does not support status-update’s for SLES10 / OES2 installations.  We needed this functionality badly, so i created a workaround, to get the status info in the SMT console..

This is how I did it:

 

Database:
First I checked the MySQL database where the statusupdate info is placed, and what happens when a status update occurs.
It seems that the table ‘Patchstatus’ does that thing, so I created a MySQL localhost user ‘updatestatus’ (pwd updatestatus) with rights to read the smt database and to modify the ‘Patchstatus’ table.  The script below is doing the same thing.

Script name: createupdatestatus.sql

Database update script on SMT server:
To get the status-info from the sles10/oes2 servers, i created a php script.  This script extracts data from the sent url en puts it into the smt database with the user credentials used above.

Script name: smt-statusupdate.php

Update-status script on SMT client:
For the smt-clients i wrote a script which retrieves the update status from the zmd / rug services.  It took some tuning and workaround to get a reliable status info (due to registration issues from suseRegister).  But i am satisfied with the results i have now.

For testing purposes i you can use smt-statusupdate.sh –v or –vv for more output.

Script name: smt-statusupdate.sh

Installation on the SMT client:
To easy install the update-status script on all servers, I created a script which does the following:
-         It is using the same command-line options as the clientSetup4SMT.sh script.
-         install the smt-statusupdate.sh into /usr/local/bin/
-         put the script into crontab to run every morning at 6:30 am.
-         restart cron.
-         start the default clientSetup4SMT.sh script to register the client to the SMT server.

Quick start:
wget http://yoursmtserver/repo/tools/installSMT.sh
chmod +x installSMT.sh
./installSMT.sh https://yoursmtserver/center/regsvc

Script name: installSMT.sh

Server install:
To get the above stuff working you have to place some files which are available here:
You should put the php and .sh scripts into the same map as where clientsetup4SMT.sh exists, this should be in /srv/www/htdocs/repo/tools on the SMT server.

(Don’t forget to enable php ;-)   The sql script should be removed after creating the MySQL updatestatus user.

After placing the files this solution should be up and running!  Please tell me if you like this or not!

disclaimer: This info is as-is, use it at your own risk!  I can not accept any responsibilty for harm caused by this information.