From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20469 invoked by alias); 8 Aug 2011 14:27:28 -0000 Received: (qmail 20461 invoked by uid 22791); 8 Aug 2011 14:27:27 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_YG X-Spam-Check-By: sourceware.org Received: from mdc1.cs.umass.edu (HELO csmail.cs.umass.edu) (128.119.240.121) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Aug 2011 14:27:13 +0000 Received: from [192.168.0.9] (c-71-192-247-69.hsd1.ma.comcast.net [71.192.247.69]) by csmail.cs.umass.edu (Postfix) with ESMTPSA id AE044180001BA70732; Mon, 8 Aug 2011 10:27:12 -0400 (EDT) Message-ID: <4E3FF23D.7040204@cs.umass.edu> Date: Mon, 08 Aug 2011 14:27:00 -0000 From: Eliot Moss Reply-To: moss@cs.umass.edu User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Portable shell code between Cygwin and Linux References: <80hb65b3ue.fsf@somewhere.org> <20110729201651.GB13084@calimero.vinschen.de> <1686210011.20110730161401@mtu-net.ru> <1065475292.20110808121457@mtu-net.ru> <4E3FA826.7090108@gmail.com> In-Reply-To: <4E3FA826.7090108@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-08/txt/msg00176.txt.bz2 On 8/8/2011 5:11 AM, Sven Köhler wrote: > Am 08.08.2011 10:14, schrieb Andrey Repin: >> Greetings, Sven Köhler! >> >>>> alias vpnup='exec sudo openvpn --config $HOME/config/client.vpn --writepid /tmp/openvpn.pid&' >>>> >>>> that's where his problem began, IMO. >> >>> I don't know, why you pointed that out. It's of no use to feed a path >>> like $HOME/something to a pure win32 binary. >> >> You DON'T "feed a path like $HOME/something" ! >> The shell that run the script will expand variable before passing it to the >> program. > > A win32 (non-cygwin) executable doesn't that /cygdrive/c refers to c:\. > It also doesn't know that /home/bla is actually the same as > c:\cygwin\home\bla. A win32 simply doesn't use cygwin, hence don't know > about the translation from cygwin's POSIX paths to win32 ones. > > It turned out, that the OP was not using a cygwin version of openvpn. > So if $HOME is a POSIX (cygwin specific) path, it won't work. Hence my remark that you also have to know about and use (properly) the cygpath utility, which can convert cygwin paths to ones for Windows/DOS programs ... Eliot Moss -- 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