ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject returncode with maverick task ssh/exec ?!
Date Wed, 14 Jun 2006 10:20:07 GMT


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

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
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"
    cmd="cd /was/test;
    /usr/local/bin/sudo /path/to/deploy_scm.ksh activate > rc_test;
    $?"  />

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"
      <arg line="{}@remotehost -batch -i ${web.ppk}
          cd /was/test ;
           /usr/local/bin/sudo /test/deploy_scm.ksh deploy ${lprojekt}
            " />

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

Any ideas, how to achieve that ?

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

Regards, Gilbert


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message