Hi,

anyone using the maverick ant task for ssh and starting a script with
exec ?

 http://www.sshtools.com/showMaverickAntTask.do

For sftp stuff maverick is great - recommended !!, but for exec ...

I would like to use maverick for starting a ksh script on the
remote machine, but the exec between <ssh> and </ssh> in maverick task
doesn't 
allow to catch the result in a property, like the exec task that ships
with ant.

ant 1.6.5 <exec> != maverick <ssh> <exec> </ssh>

for now i have =

<ssh host="remotehost"
    username="sshdummy"
    keyfile="path/to/my/keyfile"
>
<exec 
    cmd="cd /was/test;
    /usr/local/bin/sudo /path/to/deploy_scm.ksh activate > rc_test;
    $?"  />
</ssh>

which gives me =

...
      [ssh] Authenticating sshdummy
      [ssh] Performing public key authentication
      [ssh] Public key authentication completed
      [ssh] Operating system is AIX
      [ssh] Using simple pattern matcher
      [ssh] ksh: 8:  not found.
      [ssh] Disconnecting from remotehost

so in that case $? gives me rc 8 means error

i need a way to catch the rc in a property and check that property,
as i would do with the normal exec in combination with antcontrib if

f.e a snippet of another script

 <exec executable="C:/SCM_tools/PuTTY/plink.exe"
resultproperty="rc.deploy">
      <arg line="[EMAIL PROTECTED] -batch -i ${web.ppk}
          cd /was/test ;
           /usr/local/bin/sudo /test/deploy_scm.ksh deploy ${lprojekt}
${toString:ear.file}
            " />
        </exec>

<if>
   <not>
  <equals arg1="${rc.deploy}" arg2="0" />
   </not>
    <then>
     <echo>+++ RC Shellscript != 0 +++${line.separator}Error !!</echo>
      <fail />
     </then>
 </if>


Any ideas, how to achieve that ?

Problem is, i can't extend the maverick task,  though the task ships
with
sources, as it uses commercial apis.


Regards, Gilbert












Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to