ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kenneth Ljunggren" <kenn...@awardit.se>
Subject SSHExec : Remote Environment variables
Date Mon, 12 Jan 2004 14:33:47 GMT
I am trying to perform a backup of our Oracle database using the
ANT task SSHExec.

If I login with SSH using PUTTY to the oracle user and execute the EXP
command
it works perfectly, but it I execute the exact command using the ANT task
SSHExec,
I get the following result:

C:\System\backup.xml:53: Remote command failed with exit status 1

If a make another call printing out the environment variables with the
command
"bash -c set" with SSHExec I get this list.

  [sshexec] Connecting to 192.168.0.13:22
  [sshexec] BASH=/bin/bash
  [sshexec] BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release"
[5]="i686-pc-linux-gnu")
  [sshexec] BASH_VERSION='2.05b.0(1)-release'
  [sshexec] DIRSTACK=()
  [sshexec] EUID=501
  [sshexec] GROUPS=()
  [sshexec] HOME=/opt/oracle
  [sshexec] HOSTNAME=Compaq
  [sshexec] HOSTTYPE=i686
  [sshexec] IFS=$' \t\n'
  [sshexec] LOGNAME=oracle
  [sshexec] MACHTYPE=i686-pc-linux-gnu
  [sshexec] MAIL=/var/mail/oracle
  [sshexec] OPTERR=1
  [sshexec] OPTIND=1
  [sshexec] OSTYPE=linux-gnu
  [sshexec] PATH=/usr/local/bin:/bin:/usr/bin
  [sshexec] PPID=10891
  [sshexec] PS4='+ '
  [sshexec] PWD=/opt/oracle
  [sshexec] SHELL=/bin/ash
  [sshexec] SHELLOPTS=braceexpand:hashall:interactive-comments
  [sshexec] SHLVL=1
  [sshexec] SSH_CLIENT='192.168.0.10 1053 22'
  [sshexec] TERM=dumb
  [sshexec] UID=501
  [sshexec] USER=oracle
  [sshexec] _=bash

If I compared it with the list when I login with SSH using PUTTY, the
CLASSPATH
and LD_LIBRARY_PATH, NLS etc, environment variables are missing.

Is it suppose to work like this? How can I solve it without creating a
script
on the server? If I try with "bash --login -c exp" I get an error saying
that
it can not run a binary file.

/Kenneth



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message