Add check exitcode scripts from opsi wiki for a better logline in the opsi logs

This commit is contained in:
Mario Fetka
2019-10-17 09:53:30 +02:00
parent 90844b3760
commit d2e7a4d3a2
10 changed files with 616 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
;Request ExitCode from last Program
set $ExitCode$ = getLastExitCode
;Modify Loglevel
setLogLevel = 4
;Check ExitCode
if ($ExitCode$ = "0")
setLogLevel = 5
comment "ExitCode = "+$ExitCode$+" Normal execution (no error)"
setLogLevel = 4
endif
if ($ExitCode$ = "1")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" Installation aborted by user (cancel button)"
isFatalError
endif
if ($ExitCode$ = "2")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" Installation aborted by script"
isFatalError
endif
;Modify Loglevel
setLogLevel = 6