[gelöst] customScript ändert die Folgeaktion

Antworten
seteqsystems
Beiträge: 62
Registriert: 12 Sep 2012, 11:51
Wohnort: Hall in Tirol

[gelöst] customScript ändert die Folgeaktion

Beitrag von seteqsystems »

Hallo,

Heute ist der Tag der Fragen... :)

Ich habe ein Paket gebaut, das mehrere Aktionen ausführt und dazwischen den Rechner rebootet.
Dafür wollte ich eigentlich customScript verwenden, da dieses ja den Folgestatus nicht verändert, d.h. die Aktion sollte eigentlich auf "custom" stehen bleiben, bis ich das mit einem opsiservicecall auf "none" setze, richtig?

Nur leider scheint das nicht so ganz zu funktionieren wie ich mir das vorgestellt habe - ganz unten im JSON service request str sieht man schön, dass der actionRequest auf "none" zurückgesetzt wird... :(
Dieses Verhalten scheint anders zu sein als in der Doku

Kann das wer bestätigen?
Wie könnte man das Problem lösen?

Danke

Hier das Log des Paketes:

Code: Alles auswählen

[1] [24.06.2013 17:27:10] ======= APPEND   24.06.2013 17:27:10
[1] [24.06.2013 17:27:10] opsi-winst 4.11.2.9 started at >>24.06.2013 17:27:08
[1] [24.06.2013 17:27:10] startmessage winst created at CentralForm.FormCreate: 24.06.2013 17:27:08
[1] [24.06.2013 17:27:10] startmessage StartProgramModes and create log: 24.06.2013 17:27:08
[1] [24.06.2013 17:27:10] startmessage start opsi service connection: 24.06.2013 17:27:08
[1] [24.06.2013 17:27:10] startmessage create log: 24.06.2013 17:27:10
[6] [24.06.2013 17:27:10] JSON service request https://10.4.100.120:4447/rpc getDepotId
[6] [24.06.2013 17:27:10] JSON service request https://10.4.100.120:4447/rpc backend_setOptions
[6] [24.06.2013 17:27:10] JSON service request https://10.4.100.120:4447/rpc productOnClient_getObjects
[5] [24.06.2013 17:27:10] Computername:pc1.seteq.local
[5] [24.06.2013 17:27:10] Computername according to Environment Variable :ATNB7007
[5] [24.06.2013 17:27:10] opsi service URL https://10.4.100.120:4447
[5] [24.06.2013 17:27:10] Depot path:  p:\
[5] [24.06.2013 17:27:10] 
[5] [24.06.2013 17:27:10] bootmode BKSTD
[5] [24.06.2013 17:27:10] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[5] [24.06.2013 17:27:10] Resolved sequence of products (24.06.2013 17:27:10): 
[5] [24.06.2013 17:27:10] Product 1 	customtest : custom
[5] [24.06.2013 17:27:10] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [24.06.2013 17:27:10] JSON service request https://10.4.100.120:4447/rpc getProductProperties_hash
[6] [24.06.2013 17:27:11] JSON service request https://10.4.100.120:4447/rpc getProduct_hash
[6] [24.06.2013 17:27:11] JSON service request https://10.4.100.120:4447/rpc productOnClient_getObjects
[5] [24.06.2013 17:27:11] scriptname: "install.ins", special path: "p:\customtest\"
[1] [24.06.2013 17:27:11] 
[1] [24.06.2013 17:27:11] ============ Version 4.11.2.9 WIN32 script "p:\customtest\install.ins"
[1] [24.06.2013 17:27:11]              start: 2013-06-24  17:27:11 
[1] [24.06.2013 17:27:11]              on client named    "pc1.seteq.local"
[1] [24.06.2013 17:27:11]              loggedin user    ""
[1] [24.06.2013 17:27:11]              winst running as    "SYSTEM"
[1] [24.06.2013 17:27:11]              winst running with admin privileges
[1] [24.06.2013 17:27:11]              winst running in standard script mode
[1] [24.06.2013 17:27:11] [executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"]
[1] [24.06.2013 17:27:11] system infos:
[1] [24.06.2013 17:27:11] B8-76-3F-D9-1D-24  -  PC hardware address
[1] [24.06.2013 17:27:11] pc1.seteq.local  -  IP name 
[1] [24.06.2013 17:27:11] 10.170.10.184  -  IP address
[1] [24.06.2013 17:27:11] DEA  -  System default locale 
[1] [24.06.2013 17:27:11] MS Windowds 6.1 64 Bit
[1] [24.06.2013 17:27:11] opsi service version : 4
[1] [24.06.2013 17:27:11] 
[6] [24.06.2013 17:27:11] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [24.06.2013 17:27:11] Key closed
[1] [24.06.2013 17:27:11] LogLevel was 6
[1] [24.06.2013 17:27:11] LogLevel set to 9
[6] [24.06.2013 17:27:11] wInst has version  4.11.2.9, required is : >= 4.10.8.6
[5] [24.06.2013 17:27:11] 
[5] [24.06.2013 17:27:11] Set  $ProductId$       = "Custom Test Paket"
[6] [24.06.2013 17:27:11]   The value of the variable "$ProductId$" is now: "Windows Updates"
[5] [24.06.2013 17:27:11] 
[5] [24.06.2013 17:27:11] Set  $Version$         = "1.0"
[6] [24.06.2013 17:27:11]   The value of the variable "$Version$" is now: "1.0"
[5] [24.06.2013 17:27:11] Execution of Winbatch_test
[6] [24.06.2013 17:27:11]   Call "cscript /nologo P:\customtest\test.vbs /v"
[6] [24.06.2013 17:27:11]      Waiting until the called process is finished
[7] [24.06.2013 17:27:12]   Waiting for ending at 24.06.2013 17:27:12 exitcode is: 259
[7] [24.06.2013 17:27:13]   Waiting for ending at 24.06.2013 17:27:13 exitcode is: 259
[7] [24.06.2013 17:27:14]   Waiting for ending at 24.06.2013 17:27:14 exitcode is: 259
[7] [24.06.2013 17:27:15]   Waiting for ending at 24.06.2013 17:27:15 exitcode is: 259
[7] [24.06.2013 17:27:16]   Waiting for ending at 24.06.2013 17:27:16 exitcode is: 259
[7] [24.06.2013 17:27:17]   Waiting for ending at 24.06.2013 17:27:17 exitcode is: 259
[7] [24.06.2013 17:27:18]   Waiting for ending at 24.06.2013 17:27:18 exitcode is: 259
[7] [24.06.2013 17:27:19]   Waiting for ending at 24.06.2013 17:27:19 exitcode is: 259
[7] [24.06.2013 17:27:20]   Waiting for ending at 24.06.2013 17:27:20 exitcode is: 259
[7] [24.06.2013 17:27:21]   Waiting for ending at 24.06.2013 17:27:21 exitcode is: 259
[7] [24.06.2013 17:27:22]   Waiting for ending at 24.06.2013 17:27:22 exitcode is: 259
[7] [24.06.2013 17:27:23]   Waiting for ending at 24.06.2013 17:27:23 exitcode is: 259
[7] [24.06.2013 17:27:24]   Waiting for ending at 24.06.2013 17:27:24 exitcode is: 259
[7] [24.06.2013 17:27:25]   Waiting for ending at 24.06.2013 17:27:25 exitcode is: 259
[7] [24.06.2013 17:27:26]   Waiting for ending at 24.06.2013 17:27:26 exitcode is: 259
[7] [24.06.2013 17:27:27]   Waiting for ending at 24.06.2013 17:27:27 exitcode is: 259
[7] [24.06.2013 17:27:28]   Waiting for ending at 24.06.2013 17:27:28 exitcode is: 259
[7] [24.06.2013 17:27:29]   Waiting for ending at 24.06.2013 17:27:29 exitcode is: 259
[7] [24.06.2013 17:27:30]   Waiting for ending at 24.06.2013 17:27:30 exitcode is: 259
[7] [24.06.2013 17:27:31]   Waiting for ending at 24.06.2013 17:27:31 exitcode is: 259
[7] [24.06.2013 17:27:32]   Waiting for ending at 24.06.2013 17:27:32 exitcode is: 259
[7] [24.06.2013 17:27:33]   Waiting for ending at 24.06.2013 17:27:33 exitcode is: 259
[7] [24.06.2013 17:27:34]   Waiting for ending at 24.06.2013 17:27:34 exitcode is: 259
[7] [24.06.2013 17:27:35]   Waiting for ending at 24.06.2013 17:27:35 exitcode is: 259
[7] [24.06.2013 17:27:36]   Waiting for ending at 24.06.2013 17:27:36 exitcode is: 259
[7] [24.06.2013 17:27:37]   Waiting for ending at 24.06.2013 17:27:37 exitcode is: 4294967295
[8] [24.06.2013 17:27:37]   Process terminated at: 24.06.2013 17:27:37 exitcode is: 4294967295
[6] [24.06.2013 17:27:37]   ExitCode -1    Executed process "cscript /nologo P:\customtest\test.vbs /v"
[5] [24.06.2013 17:27:37] 
[5] [24.06.2013 17:27:37] Set  $ExitCode$ = getLastExitCode
[6] [24.06.2013 17:27:37]   The value of the variable "$ExitCode$" is now: "-1"
[5] [24.06.2013 17:27:37] 
[5] [24.06.2013 17:27:37] If
[5] [24.06.2013 17:27:37]   $ExitCode$ = "-1"   <<< result true
[5] [24.06.2013 17:27:37]   $ExitCode$ = "-2"   <<< result false
[5] [24.06.2013 17:27:37]   ($ExitCode$ = "-2")   <<< result false
[5] [24.06.2013 17:27:37]   ($ExitCode$ = "-1") or ($ExitCode$ = "-2")   <<< result true
[5] [24.06.2013 17:27:37] Then
[5] [24.06.2013 17:27:37]   
[5] [24.06.2013 17:27:37]   ExitWindows set to Reboot
[5] [24.06.2013 17:27:37] 
[5] [24.06.2013 17:27:37] Else
[5] [24.06.2013 17:27:37] EndIf
[1] [24.06.2013 17:27:37] ___________________
[1] [24.06.2013 17:27:37] script finished
[1] [24.06.2013 17:27:37] 0 errors
[1] [24.06.2013 17:27:37] 0 warnings
[1] [24.06.2013 17:27:37] 
[1] [24.06.2013 17:27:37] installed Produkt: customtest Version: 1.0-1
[1] [24.06.2013 17:27:37] 
[6] [24.06.2013 17:27:37] Delete "c:\opsi.org\tmp\_winstbat_*"
[6] [24.06.2013 17:27:37]   Search "c:\opsi.org\tmp\"
[8] [24.06.2013 17:27:37] Temp bat files deleted, next: free script 
[8] [24.06.2013 17:27:37] End of CreateAndProcessScript
[8] [24.06.2013 17:27:37] After CreateAndProcessScript
[8] [24.06.2013 17:27:37] End ProcessNonZeroScript
[8] [24.06.2013 17:27:37] First ProcessNonZeroScript finished
[8] [24.06.2013 17:27:37] In opsi4data.UpdateSwitches, Actionstr: custom
[8] [24.06.2013 17:27:37] Parameters in OpsiMethodCall: {"clientId":"pc1.seteq.local","actionResult":"successful","installationStatus":"not_installed","actionRequest":"none","packageVersion":null,"ident":"customtest;LocalbootProduct;pc1.seteq.local","productType":"LocalbootProduct","lastAction":"custom","productVersion":null,"modificationTime":"2013-06-24 17:27:55","productId":"customtest","actionProgress":"","type":"ProductOnClient","targetConfiguration":null,"actionSequence":1}
[8] [24.06.2013 17:27:37] Creating TSuperObject with: {"clientId":"pc1.seteq.local","actionResult":"successful","installationStatus":"not_installed","actionRequest":"none","packageVersion":null,"ident":"customtest;LocalbootProduct;pc1.seteq.local","productType":"LocalbootProduct","lastAction":"custom","productVersion":null,"modificationTime":"2013-06-24 17:27:55","productId":"customtest","actionProgress":"","type":"ProductOnClient","targetConfiguration":null,"actionSequence":1}
[8] [24.06.2013 17:27:37] got omc.jsonUrlString: {"method":"productOnClient_updateObject","params":[{"clientId":"pc1.seteq.local","actionResult":"successful","installationStatus":"not_installed","actionRequest":"none","packageVersion":null,"ident":"customtest;LocalbootProduct;pc1.seteq.local","productType":"LocalbootProduct","lastAction":"custom","productVersion":null,"modificationTime":"2013-06-24 17:27:55","productId":"customtest","actionProgress":"","type":"ProductOnClient","targetConfiguration":null,"actionSequence":1}],"id":1}
[8] [24.06.2013 17:27:37] Creating TSuperObject with: {"clientId":"pc1.seteq.local","actionResult":"successful","installationStatus":"not_installed","actionRequest":"none","packageVersion":null,"ident":"customtest;LocalbootProduct;pc1.seteq.local","productType":"LocalbootProduct","lastAction":"custom","productVersion":null,"modificationTime":"2013-06-24 17:27:55","productId":"customtest","actionProgress":"","type":"ProductOnClient","targetConfiguration":null,"actionSequence":1}
[8] [24.06.2013 17:27:37] got omc.jsonUrlString: {"method":"productOnClient_updateObject","params":[{"clientId":"pc1.seteq.local","actionResult":"successful","installationStatus":"not_installed","actionRequest":"none","packageVersion":null,"ident":"customtest;LocalbootProduct;pc1.seteq.local","productType":"LocalbootProduct","lastAction":"custom","productVersion":null,"modificationTime":"2013-06-24 17:27:55","productId":"customtest","actionProgress":"","type":"ProductOnClient","targetConfiguration":null,"actionSequence":1}],"id":1}
[8] [24.06.2013 17:27:37] got Furl: https://10.4.100.120:4447/rpc
[6] [24.06.2013 17:27:37] JSON service request https://10.4.100.120:4447/rpc productOnClient_updateObject
[8] [24.06.2013 17:27:37] Creating TSuperObject with: {"clientId":"pc1.seteq.local","actionResult":"successful","installationStatus":"not_installed","actionRequest":"none","packageVersion":null,"ident":"customtest;LocalbootProduct;pc1.seteq.local","productType":"LocalbootProduct","lastAction":"custom","productVersion":null,"modificationTime":"2013-06-24 17:27:55","productId":"customtest","actionProgress":"","type":"ProductOnClient","targetConfiguration":null,"actionSequence":1}
[8] [24.06.2013 17:27:37]  JSON service request Furlhttps://10.4.100.120:4447/rpc
[8] [24.06.2013 17:27:37]  JSON service request str{"method":"productOnClient_updateObject","params":[{"clientId":"pc1.seteq.local","actionResult":"successful","installationStatus":"not_installed","actionRequest":"none","packageVersion":null,"ident":"customtest;LocalbootProduct;pc1.seteq.local","productType":"LocalbootProduct","lastAction":"custom","productVersion":null,"modificationTime":"2013-06-24 17:27:55","productId":"customtest","actionProgress":"","type":"ProductOnClient","targetConfiguration":null,"actionSequence":1}],"id":1}
[7] [24.06.2013 17:27:37] Registry started with redirection (32 Bit)
[6] [24.06.2013 17:27:37] Registry key [HKLM\SOFTWARE\opsi.org\winst]  opened
[6] [24.06.2013 17:27:37]                       Variable "RebootRequested"  had value  "0"
[6] [24.06.2013 17:27:37]                       Info:    "RebootRequested"  changed to "4"
[6] [24.06.2013 17:27:37]                       Variable "LastLogFilename"  is keeping its value "c:\tmp\instlog.txt"
[6] [24.06.2013 17:27:37]                       Variable "ContinueLogFile"  is keeping its value "1"
[6] [24.06.2013 17:27:37]                       Variable "NumberOfErrors"  is keeping its value "0"
[6] [24.06.2013 17:27:37]                       Key flushed
[6] [24.06.2013 17:27:37]                       Key closed
Zuletzt geändert von seteqsystems am 01 Jul 2013, 08:45, insgesamt 1-mal geändert.
seteqsystems
Beiträge: 62
Registriert: 12 Sep 2012, 11:51
Wohnort: Hall in Tirol

Re: customScript ändert die Folgeaktion - oder nicht?

Beitrag von seteqsystems »

Zur Info: Ich aktualisier heut mal auf 4.0.3 - mal sehen ob das Problem immer noch besteht.
seteqsystems
Beiträge: 62
Registriert: 12 Sep 2012, 11:51
Wohnort: Hall in Tirol

Re: customScript ändert die Folgeaktion - oder nicht?

Beitrag von seteqsystems »

Bin jetzt auf 4.0.3, das Problem besteht immer noch.

Bitte um Hilfe!
seteqsystems
Beiträge: 62
Registriert: 12 Sep 2012, 11:51
Wohnort: Hall in Tirol

Re: customScript ändert die Folgeaktion - oder nicht?

Beitrag von seteqsystems »

Meine Erkenntnis: Das customScript ändert die Folgeaktion sehr wohl...

Ich habe meine Problemstellung jetzt mittels ExitWindows /ImmediateReboot gelöst.
Dadurch bleibt die Folgeaktion unverändert.

Wäre schön, wenn das in der Doku auch richtiggestellt werden könnte - hätte mir einiges an Zeit erspart!

Danke.
Antworten