mir ist bei der Benutzung des localfuntion "linuxInstallOneFile" ein Fehler aufgefallen? Laut Doku (https://download.uib.de/opsi_stable/doc ... opsiscript) sollte bei der erfolgreichen Installation ein exitcode also String "true" und alles andere "false" ergeben.
Mit meiner manuelle Überprüfung auf meinen Test-Client hat ergeben, dass die Funktion das deb Paket - erfolgreich installiert wurde. Aber im Log die Rückgabewert verkehrt übergeben werden. Also erfolgreich = "false" und nicht erfolgreich = true".
Mein Auszug aus dem Log (Level 8):
Hierzu ein Auszug meines opsi-script dazu:(947) [8] [2023-09-18 11:08:31.204] [o4i_rocketchat] We are coming from function with index: -1 (-1 = base)
(948) [8] [2023-09-18 11:08:31.204] [o4i_rocketchat] We enter the defined function: linuxinstallonefile with 38 lines. inDefFuncLevel: 1 and index: 16
(949) [8] [2023-09-18 11:08:31.204] [o4i_rocketchat] Paramnr: 0 is the string: /media/opsi_depot/o4i_rocketchat/installfiles/rocketchat-3.9.7-linux-amd64.deb
(950) [8] [2023-09-18 11:08:45.093] [o4i_rocketchat] We leave the defined function: linuxinstallonefile ; inDefFuncLevel: 0
(951) [7] [2023-09-18 11:08:45.093] [o4i_rocketchat] stringToBool(linuxInstallOneFile($FullSetupFileDir$)) <<< result false
(952) [6] [2023-09-18 11:08:45.093] [o4i_rocketchat] Then
(953) [6] [2023-09-18 11:08:45.093] [o4i_rocketchat] EndIf
Code: Alles auswählen
importlib "uib_lin_install"
DefVar $Setupfiledir$ = "%ScriptPath%/installfiles/"
DefStringList $Listfiles$ = listFiles($Setupfiledir$, "*.deb", "true")
if not (count($Listfiles$) = "1")
isFatalError "Obviously the maintainer forgot to delete an old installer file!!!"
endif
DefVar $FullSetupFileDir$ = takeString(-1,$Listfiles$)
if stringToBool(linuxInstallOneFile($FullSetupFileDir$))
comment "success"
endif
Ubuntu 22.04.3 LTS
opsi-linux-client-agent: 4.2.0.40-1
opsi-scirpt: 4.12.10.0-4
Viele Grüße
Patrick