Shellscript /TimeOutSeconds funktioniert nicht.

Antworten
Patrick89bvb
Beiträge: 44
Registriert: 05 Nov 2015, 11:26

Shellscript /TimeOutSeconds funktioniert nicht.

Beitrag von Patrick89bvb »

Moin liebes uib-Team!

mir fällt auf, dass "Shellscript_Extract /TimeOutSeconds "1"" nicht funktioniert, aber mit WinBatch funktioniert es. Hier einmal ein Auszug aus dem Log:

Code: Alles auswählen

(209)     [6] [2023-12-28 11:06:10.922] [thinkpad-driver-graphics-intel] opsi-script has version  4.12.12.1, required is : >= 4.12.4.21
(1242)    [5] [2023-12-28 11:06:22.491] [thinkpad-driver-graphics-intel] Execution of: Shellscript_Extract /TimeOutSeconds "1"
(1243)    [7] [2023-12-28 11:06:22.494] [thinkpad-driver-graphics-intel]   Save to file with encoding: system
(1244)    [8] [2023-12-28 11:06:22.495] [thinkpad-driver-graphics-intel]   Will save (system) encoding to file: C:\opsi.org\tmp\_opsiscript_4r41rNQBx1.cmd :
(1245)    [8] [2023-12-28 11:06:22.495] [thinkpad-driver-graphics-intel]   Content of saved file: c:\opsi.org\tmp\_opsiscript_4r41rNQBx1.cmd
(1246)    [8] [2023-12-28 11:06:22.495] [thinkpad-driver-graphics-intel]   -----------------------
(1247)    [8] [2023-12-28 11:06:22.495] [thinkpad-driver-graphics-intel]   p:\thinkpad-driver-graphics-intel\installfiles\21AJ\n3bi531w.exe /SP- /Silent /DIR="c:\opsi.org\tmp\thinkpad-driver-graphics-intel\"
(1248)    [8] [2023-12-28 11:06:22.495] [thinkpad-driver-graphics-intel]   -----------------------
(1249)    [7] [2023-12-28 11:06:22.495] [thinkpad-driver-graphics-intel]   Executing "C:\Windows\system32\\cmd.exe" /C c:\opsi.org\tmp\_opsiscript_4r41rNQBx1.cmd /TimeOutSeconds "1"
(1250)    [6] [2023-12-28 11:06:22.495] [thinkpad-driver-graphics-intel]   Start process as invoker: SYSTEM
(1251)    [6] [2023-12-28 11:06:22.501] [thinkpad-driver-graphics-intel]   Started process "C:\Windows\system32\\cmd.exe" with Opt: /C\r\nc:\opsi.org\tmp\_opsiscript_4r41rNQBx1.cmd\r\n/TimeOutSeconds\r\n"1"
(1252)    [8] [2023-12-28 11:06:23.521] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:23 exitcode is: 259 output bytes read: 157
(1253)    [8] [2023-12-28 11:06:24.523] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:24 exitcode is: 259 output bytes read: 157
(1254)    [8] [2023-12-28 11:06:25.517] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:25 exitcode is: 259 output bytes read: 157
(1255)    [8] [2023-12-28 11:06:26.522] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:26 exitcode is: 259 output bytes read: 157
(1256)    [8] [2023-12-28 11:06:27.513] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:27 exitcode is: 259 output bytes read: 157
(1257)    [8] [2023-12-28 11:06:28.514] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:28 exitcode is: 259 output bytes read: 157
(1258)    [8] [2023-12-28 11:06:29.517] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:29 exitcode is: 259 output bytes read: 157
(1259)    [8] [2023-12-28 11:06:30.516] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:30 exitcode is: 259 output bytes read: 157
(1260)    [8] [2023-12-28 11:06:31.520] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:31 exitcode is: 259 output bytes read: 157
(1261)    [8] [2023-12-28 11:06:32.521] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:32 exitcode is: 259 output bytes read: 157
(1262)    [8] [2023-12-28 11:06:33.519] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:33 exitcode is: 259 output bytes read: 157
(1263)    [8] [2023-12-28 11:06:34.522] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:34 exitcode is: 259 output bytes read: 157
(1264)    [8] [2023-12-28 11:06:35.519] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:35 exitcode is: 259 output bytes read: 157
(1265)    [8] [2023-12-28 11:06:36.511] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:36 exitcode is: 259 output bytes read: 157
(1266)    [8] [2023-12-28 11:06:37.515] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:37 exitcode is: 259 output bytes read: 157
(1267)    [8] [2023-12-28 11:06:38.521] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:38 exitcode is: 259 output bytes read: 157
(1268)    [8] [2023-12-28 11:06:39.520] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:39 exitcode is: 259 output bytes read: 157
(1269)    [8] [2023-12-28 11:06:40.522] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:40 exitcode is: 259 output bytes read: 157
(1270)    [8] [2023-12-28 11:06:41.518] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:41 exitcode is: 259 output bytes read: 157
(1271)    [8] [2023-12-28 11:06:42.515] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:42 exitcode is: 259 output bytes read: 157
(1272)    [8] [2023-12-28 11:06:43.514] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:43 exitcode is: 259 output bytes read: 157
(1273)    [8] [2023-12-28 11:06:44.518] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:44 exitcode is: 259 output bytes read: 157
(1274)    [8] [2023-12-28 11:06:45.524] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:45 exitcode is: 259 output bytes read: 157
(1275)    [8] [2023-12-28 11:06:46.519] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:46 exitcode is: 259 output bytes read: 157
(1276)    [8] [2023-12-28 11:06:47.516] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:47 exitcode is: 259 output bytes read: 157
(1277)    [8] [2023-12-28 11:06:48.512] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:48 exitcode is: 259 output bytes read: 157
(1278)    [8] [2023-12-28 11:06:49.516] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:49 exitcode is: 259 output bytes read: 157
(1279)    [8] [2023-12-28 11:06:50.517] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:50 exitcode is: 259 output bytes read: 157
(1280)    [8] [2023-12-28 11:06:51.518] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:51 exitcode is: 259 output bytes read: 157
(1281)    [8] [2023-12-28 11:06:52.523] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:52 exitcode is: 259 output bytes read: 157
(1282)    [8] [2023-12-28 11:06:53.515] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:53 exitcode is: 259 output bytes read: 157
(1283)    [8] [2023-12-28 11:06:54.520] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:54 exitcode is: 259 output bytes read: 157
(1284)    [8] [2023-12-28 11:06:55.515] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:55 exitcode is: 259 output bytes read: 157
(1285)    [8] [2023-12-28 11:06:56.512] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:56 exitcode is: 259 output bytes read: 157
(1286)    [8] [2023-12-28 11:06:57.527] [thinkpad-driver-graphics-intel]   Waiting for ending at 28.12.2023 11:06:57 exitcode is: 259 output bytes read: 157
(1287)    [7] [2023-12-28 11:06:57.587] [thinkpad-driver-graphics-intel]           
(1288)    [7] [2023-12-28 11:06:57.587] [thinkpad-driver-graphics-intel]           output:
(1289)    [7] [2023-12-28 11:06:57.587] [thinkpad-driver-graphics-intel]           --------------
(1290)    [7] [2023-12-28 11:06:57.587] [thinkpad-driver-graphics-intel]           
(1291)    [7] [2023-12-28 11:06:57.587] [thinkpad-driver-graphics-intel]           C:\Windows\System32>p:\thinkpad-driver-graphics-intel\installfiles\21AJ\n3bi531w.exe /SP- /Silent /DIR="c:\opsi.org\tmp\thinkpad-driver-graphics-intel\"
(1292)    [7] [2023-12-28 11:06:57.587] [thinkpad-driver-graphics-intel]   
(1293)    [7] [2023-12-28 11:06:57.591] [thinkpad-driver-graphics-intel]   The file: c:\opsi.org\tmp\_opsiscript_4r41rNQBx1.cmd has been deleted
(1294)    [6] [2023-12-28 11:06:57.591] [thinkpad-driver-graphics-intel]     Search "c:\opsi.org\tmp\_opsiscript_*"
(1295)    [5] [2023-12-28 11:06:57.594] [thinkpad-driver-graphics-intel]   Execution of: WinBatch_Extract /TimeOutSeconds "1"
(1296)    [6] [2023-12-28 11:06:57.598] [thinkpad-driver-graphics-intel]     Call "p:\thinkpad-driver-graphics-intel\installfiles\21AJ\n3bi531w.exe /SP- /Silent /DIR="c:\opsi.org\tmp\thinkpad-driver-graphics-intel\""
(1297)    [6] [2023-12-28 11:06:57.598] [thinkpad-driver-graphics-intel]        Timeout 1 seconds
(1298)    [6] [2023-12-28 11:06:57.598] [thinkpad-driver-graphics-intel]        Waiting until the called process is finished
(1299)    [6] [2023-12-28 11:06:57.598] [thinkpad-driver-graphics-intel]     Start process as invoker: SYSTEM
(1300)    [6] [2023-12-28 11:06:57.625] [thinkpad-driver-graphics-intel]     Started process "p:\thinkpad-driver-graphics-intel\installfiles\21AJ\n3bi531w.exe" with Opt: /SP-\r\n/Silent\r\n/DIR="c:\opsi.org\tmp\thinkpad-driver-graphics-intel\"
(1301)    [3] [2023-12-28 11:06:58.636] [thinkpad-driver-graphics-intel]     Error: Timeout: Waited for the end of started process" - but time out reached after 1 sec.
(1302)    [6] [2023-12-28 11:06:58.636] [thinkpad-driver-graphics-intel]     ExitCode 0    Executed process "p:\thinkpad-driver-graphics-intel\installfiles\21AJ\n3bi531w.exe /SP- /Silent /DIR="c:\opsi.org\tmp\thinkpad-driver-graphics-intel\""
(1303)    [6] [2023-12-28 11:06:58.644] [thinkpad-driver-graphics-intel]   If
(1304)    [8] [2023-12-28 11:06:58.644] [thinkpad-driver-graphics-intel]   (TotalErrors: 1 - ErrorMark: 0) = 0 -> 0
(1305)    [7] [2023-12-28 11:06:58.644] [thinkpad-driver-graphics-intel]   errorsOccurredSinceMark = 0   <<< result false
(1306)    [6] [2023-12-28 11:06:58.644] [thinkpad-driver-graphics-intel]   not(errorsOccurredSinceMark = 0)   <<< result true
(1307)    [6] [2023-12-28 11:06:58.644] [thinkpad-driver-graphics-intel] Then
(1308)    [3] [2023-12-28 11:06:58.644] [thinkpad-driver-graphics-intel]   Error: Install going to timeout
(1309)    [6] [2023-12-28 11:06:58.644] [thinkpad-driver-graphics-intel] EndIf
Folgende Versionen sind installiert:
opsi-client-agent: 4.2.0.69-1
opsi-script: 4.12.12.1

Vielen Dank im Voraus und ich wünsche euch allen an guten Rutsch und Start im Jahr 2024!
Benutzeravatar
SisterOfMercy
Beiträge: 1524
Registriert: 22 Jun 2012, 19:18

Re: Shellscript /TimeOutSeconds funktioniert nicht.

Beitrag von SisterOfMercy »

https://docs.opsi.org/opsi-docs-en/4.3/ ... allsection

Try this:

Code: Alles auswählen

Shellscript_Extract WINST /TimeOutSeconds 1
Why the low value of timeoutseconds?
Isn't it easier to extract this driver on a testmachine first? Then you could put it in a zip file, like this:

Code: Alles auswählen

[Files_install_64]
unzipfile "%ScriptPath%\files\x64.zip" "$InstallDir64$"
Zuletzt geändert von SisterOfMercy am 04 Jan 2024, 15:14, insgesamt 1-mal geändert.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Patrick89bvb
Beiträge: 44
Registriert: 05 Nov 2015, 11:26

Re: Shellscript /TimeOutSeconds funktioniert nicht.

Beitrag von Patrick89bvb »

SisterOfMercy hat geschrieben: 28 Dez 2023, 19:10 http://bonifax.uib.gmbh/opsidoc/antora/ ... allsection

Try this:

Code: Alles auswählen

Shellscript_Extract WINST /TimeOutSeconds 1
Interesting

Code: Alles auswählen

(250)     [5] [2023-12-29 09:24:41.382] [00_test-package-pk] Execution of: ShellScript_Test WINST /TimeOutSeconds 1
(251)     [7] [2023-12-29 09:24:41.384] [00_test-package-pk]   found /Timeoutseconds: 1
(252)     [7] [2023-12-29 09:24:41.384] [00_test-package-pk]   Save to file with encoding: system
(253)     [8] [2023-12-29 09:24:41.384] [00_test-package-pk]   Will save (system) encoding to file: C:\opsi.org\tmp\_opsiscript_5TW78pi8Nm.cmd :
(254)     [8] [2023-12-29 09:24:41.384] [00_test-package-pk]   Content of saved file: c:\opsi.org\tmp\_opsiscript_5TW78pi8Nm.cmd
(255)     [8] [2023-12-29 09:24:41.385] [00_test-package-pk]   -----------------------
(256)     [8] [2023-12-29 09:24:41.385] [00_test-package-pk]   pause
(257)     [8] [2023-12-29 09:24:41.385] [00_test-package-pk]   -----------------------
(258)     [6] [2023-12-29 09:24:41.385] [00_test-package-pk]      Timeout 1 seconds
(259)     [7] [2023-12-29 09:24:41.385] [00_test-package-pk]   Executing "C:\WINDOWS\system32\\cmd.exe" /C c:\opsi.org\tmp\_opsiscript_5TW78pi8Nm.cmd
(260)     [6] [2023-12-29 09:24:41.385] [00_test-package-pk]   Start process as invoker: SYSTEM
(261)     [6] [2023-12-29 09:24:41.396] [00_test-package-pk]   Started process "C:\WINDOWS\system32\\cmd.exe" with Opt: /C\r\nc:\opsi.org\tmp\_opsiscript_5TW78pi8Nm.cmd
(262)     [3] [2023-12-29 09:24:42.413] [00_test-package-pk]   Error: Timeout: Waited for the end of started process" - but time out reached after 1 sec.
(263)     [7] [2023-12-29 09:24:42.414] [00_test-package-pk]           
(264)     [7] [2023-12-29 09:24:42.414] [00_test-package-pk]           output:
(265)     [7] [2023-12-29 09:24:42.414] [00_test-package-pk]           --------------
(266)     [7] [2023-12-29 09:24:42.414] [00_test-package-pk]           
(267)     [7] [2023-12-29 09:24:42.414] [00_test-package-pk]           C:\Windows\System32>pause
(268)     log line contains non UTF8 chars
(269)     [7] [2023-12-29 09:24:42.414] [00_test-package-pk]   
(270)     [7] [2023-12-29 09:24:42.429] [00_test-package-pk]   The file: c:\opsi.org\tmp\_opsiscript_5TW78pi8Nm.cmd has been deleted
(271)     [6] [2023-12-29 09:24:42.429] [00_test-package-pk]     Search "c:\opsi.org\tmp\_opsiscript_*"
With call as winst, the timeout do working.
SisterOfMercy hat geschrieben: 28 Dez 2023, 19:10 Why the low value of timeoutseconds?
only for demonstration.
SisterOfMercy hat geschrieben: 28 Dez 2023, 19:10 Isn't it easier to extract this driver on a testmachine first? Then you could put it in a zip file, like this:

Code: Alles auswählen

[Files_install_64]
unzipfile "%ScriptPath%\files\x64.zip" "$InstallDir64$"
For only zip-files is this the best option, but the driver-setup-file from thinkpad-driver has a inno-setup-exe.
Benutzeravatar
SisterOfMercy
Beiträge: 1524
Registriert: 22 Jun 2012, 19:18

Re: Shellscript /TimeOutSeconds funktioniert nicht.

Beitrag von SisterOfMercy »

Patrick89bvb hat geschrieben: 29 Dez 2023, 09:31 For only zip-files is this the best option, but the driver-setup-file from thinkpad-driver has a inno-setup-exe.
Yes. But you run this setup first on a test VM, then get the stuff from probably c:\drivers\, and pack that in a zip file.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten