This action allows the execution of system command, a command executable
or a batch script.
Parameters:
command: the command to run. It can be a script
with the extension .sh on Linux (it is run as sh script.sh),
or .bat on Windows,
or a system command.
- parameters: [Optional] use to specify the command
parameters that will be provided as arguments on command invocation.
- origin: [Optional, Default=Local] defines where
the command is located. Allowed values are Local or Server.
If Server is indicated the command has to be located
in the global/remboc directory on the server.
- timeout: [Optional, Default=288000] the maximum
amount of time to wait for command to complete in cents of seconds.
Default is 48 minutes.
- onerror: [Optional, Default=Stop] defines the
action behavior in case of command error. Allowed values are Stop or Continue.
If Stop is specified, a command error will cause
the action to fail.
- prefix: [Optional Default=local://root/x$/ on
WinPE, local://root/root/ on LinuxDE, local://root/c$/ on
Windows OS, local://root/tmp/ on Linux OS] defines
the root location on the target system and has to be a local URL.
The parameter value represents the directory where the command is
run.
On Linux, if command
parameter is ls, then on the target the command ls will
be run:
command=ls -> running "ls"
If
command parameter is script.sh, then on the target
the command sh script.sh will be run:
command=script.sh
-> running "sh script.sh"
Examples
[CUSTOM]
name=MyCommand
description=TestMyCommands
numactions=1
ON_FAILURE_REBOOT=false
[Action_0]
name=RunCommand
[Parameters_Action_0]
command=CustomRun.bat
parameters = clean
origin = Server
timeout = 34000
onerror = Continue
prefix = "local://root/x$/"
parameters = clean
This built-in action is available as primitive in remboc scripts.