Is it possible to set a status in configed

Antworten
bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Is it possible to set a status in configed

Beitrag 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
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3327
Registriert: 04 Jun 2008, 14:27

Re: Is it possible to set a status in configed

Beitrag 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


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Re: Is it possible to set a status in configed

Beitrag von bobzbobz »

Hi

Okay, thank you. I will use isFatalError.

Best Regards,
Soren
Antworten