The success control of pre-/post-scripting by Central Management is not performed by checking
the exit code of the scripts (exit 0 for instance) but by the existence of a file in the
directory where the scsipt(s) reside.
The name of the file is "scriptname_with_extension".ok on UNIX/Linux, in UNIX Shell syntax $0.ok.
The name of the file is "scriptname_without_extension".ok on Windows, in Windows command language %~pn0.ok.
Script name is
OK file name must be
The Central Management removes the OK files of pre- or post-scripts right before the script is started.
On UNIX/Linux, the end of a script must read
echo SomethingOrNothing > $0.ok
On Windows, the end of a script must read
echo SomethingOrNothing > %~pn0.ok
The script writer personally decides if and on which condition the OK file is created by the script.
For instance, if a command executed inside the script is crucial for the success of the script and the command fails, it is a good idea not to create an OK file for this script run.
Doing this, the script will be seen as unsuccessfully finished and further processing will not be done.
In order to add information available inside the script to the job results, use the file
on UNIX/Linux or
This file will get transferred to Central Management at the end of the job and will be part of the result file in the "Customer defined information" section.
Use it like this for example to show the exit codes of the 2 mount commands in the result file:
echo prescript command results > /Hiback/msg/$1.cif
echo RC von mount x ist $RC >> /Hiback/msg/$1.cif
echo RC von mount y ist $RC >> /Hiback/msg/$1.cif
The echoed text will then be part of the result file in the "Customer defined information" section.