Seite 1 von 1

Is it possible to set a status in configed

Verfasst: 20 Feb 2013, 13:51
von bobzbobz
Hi

Is it possible to make a script change the status in opsi-configed after it has been run?

I have a package (vmwaretools) which, during the setup-phase, checks to see if the PC is virtual or not.
If the PC is virtual it installs the package, and sets the status to "installed".
However - if the PC is not virtual, it doesnt install the package, but stills sets the status to "installed".

Its a bit hard to explain, but i have an example of what i would like to happen:

Code: Alles auswählen

DefStringList $list$
DefVar $PCModel$

Set $list$ = getOutStreamFromSection("DosInAnIcon_getmodel")
Set $PCModel$ = takeFirstStringContaining($list$,"VMware")

<more code>

if contains($PCModel$, "VMware")
install the program...
else
comment "The PC is not virtual! the program will not be installed"
setstatus "none"
endif

Re: Is it possible to set a status in configed

Verfasst: 21 Feb 2013, 20:40
von d.oertel
Hi,

sorry, but is not possible the way you hope.

That is because if you do not call 'isFatalError' inside the script, opsi-winst asume that everything is fine and switch to installed *after* the script has finished. So even you change the installation state while the script is running it does not help.

So you may use the feature that you can give a string with 'isFatalError'

Code: Alles auswählen

isFatalError "not virtual"
and you will see this in the configed in the 'Report' column.

regards

d.oertel

Re: Is it possible to set a status in configed

Verfasst: 25 Feb 2013, 13:29
von bobzbobz
Hi

Okay, thank you. I will use isFatalError.

Best Regards,
Soren