I am trying to build a script which utilizes ctmcreate with error catching. As an example,
ctmcreate adasdasdas
RC=${?}
if [ ${RC} -ne 0 ] ; then
echo "FAILED"
else
echo "SUCCESS"
fi
exit ${RC}
This should output FAILED and exit with a number other than 0 as the ctmcreate statement is wrong but it always would output SUCCESS and 0.. Please help.
Please tell me how I could catch all possible errors with the ctmcreate statement and exit with a number other than 0 if wrong..
Thanks.
Even this fails..
[xxxxx@ethp1234:/home/xxxxx]
$ ctmcreate asdadad
Invalid parameter:
usage: ctmcreate
….
..
[xxxxx@ethp1234:/home/xxxxx]
$ echo $?
0
Help on ctmcreate
Bobby, which version of the agent and server are you running? I am running a 6.3 and 6.4 server with 6.3 agents. A ctmcreate issued at either the agent or server side does issue an RC of 1 upon on unsuccessful run.
I would verify that your server and agents are fully patched. If that is the case, I would open a case with BMC.
I would verify that your server and agents are fully patched. If that is the case, I would open a case with BMC.
Hi,
A ctmcreate (with no parameters) executed from the agent or the server return an RC=1 upon on unsuccessful run.
Version tested:
V6.1.03.xxx
Control-M/Server Solaris 6.1.03.400 rc=1
Control-M/Agent Solaris 6.1.03.301 rc=1
Control-M/Agent AIX 6.1.03.300 rc=1
V6.3.01.xxx
Control-M/Server Solaris 6.3.01.500 rc=1
Control-M/Server AIX 6.3.01.401 rc=1
Control-M/Agent Solaris 6.3.01.400 rc=1
Control-M/Agent AIX 6.3.01.400 rc=1
A ctmcreate (with no parameters) executed from the agent or the server return an RC=1 upon on unsuccessful run.
Version tested:
V6.1.03.xxx
Control-M/Server Solaris 6.1.03.400 rc=1
Control-M/Agent Solaris 6.1.03.301 rc=1
Control-M/Agent AIX 6.1.03.300 rc=1
V6.3.01.xxx
Control-M/Server Solaris 6.3.01.500 rc=1
Control-M/Server AIX 6.3.01.401 rc=1
Control-M/Agent Solaris 6.3.01.400 rc=1
Control-M/Agent AIX 6.3.01.400 rc=1
Best regards
Walty
Walty