Scripts can be registered to perform required processes on business servers before and/or after execution of processes configured using the Patch Application wizard or Parameter Settings wizard. You can register any script in the Script Execution wizard and run it on a business server.
Notes on registering scripts are shown below.
Notes on creating scripts
Valid return values for use in scripts
Create the script so that it returns "0" when successfully completed, or another value when an error occurs - note that values from 159 to 240 cannot be used as return values.
Script file names
Only printable ASCII codes can be used for script file names.
In Windows, ".bat" or ".cmd" should be used for the script extensions.
Notes on creating scripts for use across different platforms
When creating scripts for use across different platforms, the line feed code must be converted to suit the operating system:
In Windows, use CR/LF (carriage return followed by line feed).
In Linux, use LF (line feed).
Commands that cannot be used with a script
Do not execute the following commands from a script, because this will cause the script to enter standby status on the business server, and its processing will not complete.
Commands that require interaction [Windows/Linux]
Commands for which a window opens during execution [Windows]
AT commands [Windows]
Shell scripts created using PowerShell [Windows]
Commands running in full-screen mode [Linux]
Example of log output when an error occurs
A return value of "0" indicates that the script was executed normally, while any other value indicates an error.
If a value other than "0" is returned, indicating an error in the script, and there has been no specification to continue in the event of an error, a "Pre-execution script error check", "Post-execution script error check", or "script execution failure check" will be generated.
The log below can be confirmed from Details in the task tab window.
Example:
<2012-04-16 16:23:24>:executeCommand["C:/Fujitsu/Systemwalker/SWCFMGA/var/process/65359/pre_script.bat"] message:The operation component was successful. command_stdout: command_stderr: command_rcode:1 returnCode:1
The value in "command_rcode" above is the value returned by the script - refer to this value and review the script.
Example of script attachments
Registered scripts are attached to "patch distribution acceptance" tasks, "patch application acceptance" tasks, "parameter setting acceptance" tasks, and "script execution acceptance" tasks on the management console Task Management window as file attachments.
An example is shown below.