lcdremexec [-e] -d destname — cmd [arg1 arg2 arg3 … argn]
This program sends a remote request over the LifeKeeper communication paths to the system destname, to execute the command cmd remotely with arguments arg1 arg2 arg3 … of the and returns the standard output and standard error of the remote command to standard output of the lcdremexec command. The exit code of the remote command is returned by lcdremexec.
Note: If destname is the current system, no messages are sent; lcdremexec will execute it locally.
The -e option will split standard output and standard error of the remote command and first print standard output of the remote command to standard output of lcdremexec, then print standard error of the remote command to standard error of the lcdremexec command. This option has no effect for local commands, which have their standard output and standard error unchanged.
cmd can be either a Korn shell script or a Win32 executable. It will be executed with %LKROOT% on destname as the current working directory, thus being able to accept path names relative to %LKROOT%.
Before executing, the directory %LKROOT%\BIN is always added to the head of the PATH variable on destname. If destname is DEAD or goes DEAD in the middle of the execution, lcdremexec returns a non-zero exit code.