X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=2.0 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TBC,TW_RW,TW_WX,TW_XR
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Mon, 28 Nov 2011 17:17:06 +0200
Message-ID: <CAEYw_q=wnEjzL_sc=568jPgcQ5V9EbCF3mdNq2X+A5BF-c4H0Q@mail.gmail.com>
Subject: Problem with ssh in non-interactive mode and mapped drives
From: Costin Caraivan <costincaraivan@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hello,

I have a mapped drive pointing to a Windows network share. In this
share I have several files for which I'm checking the MD5 with this
command:
if [ `/bin/cat /cygdrive/z/builds/latest/PROJECT.MD5 | grep PROJECT_TM
| cut -f 1 -d " "` ==
`md5sum.exe /cygdrive/z/builds/latest/PROJECT_TM.zip | cut -f 1 -d "
"` ]; then echo "PROJECT_TM package MD5 matched expected MD5."; else
echo "PROJECT_TM package MD5 did not match expected MD5: `/bin/cat
/cygdrive/z/builds/latest/PROJECT.MD5 | grep PROJECT_TM | cut -f 1 -d
" "`"; exit -2; fi

PROJECT_TM package MD5 matched expected MD5.


When running the command interactively, everything is ok:
PROJECT_TM package MD5 matched expected MD5.

When running the command non-interactively, with this: ssh
PROJECTctier@LOCATIONsd-vm-admin.PROJECT.COMPANY.com 'COMMAND', I get
this:
No such file: /cygdrive/z/builds/latest/PROJECT_TM.zip
bash: line 0: [: c3e3cb8bb6b7b07915755ba8d242fa56: unary operator expected
PROJECT_TM package MD5 did not match expected MD5:
c3e3cb8bb6b7b07915755ba8d242fa56
Connection to LOCATIONsd-vm-admin.PROJECT.COMPANY.com closed.

I tried ssh -t, ssh -tt, same thing happens.

Got any idea why the file is not found in non-interactive mode?
Further information:
uname -srv
CYGWIN_NT-6.0-WOW64 1.7.9(0.237/5/3) 2011-03-29 10:10

mount
Z: on /cygdrive/z type netapp (binary,posix=0,user,noumount,auto)

ls -lah /cygdrive/z/builds/latest/PROJECT_TM.zip
-rwxrwx--- 1 Administrators Domain Users 25M Nov 29 00:26
/cygdrive/z/builds/latest/PROJECT_TM.zip


I'm kinda stumped (still digging though) :(
_____________
Costin Caraivan

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

