X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <4E3FA826.7090108@gmail.com> Date: Mon, 08 Aug 2011 11:11:02 +0200 From: =?UTF-8?B?U3ZlbiBLw7ZobGVy?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110706 Thunderbird/5.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: Andrey Repin Subject: Re: Portable shell code between Cygwin and Linux References: <80hb65b3ue DOT fsf AT somewhere DOT org> <20110729201651 DOT GB13084 AT calimero DOT vinschen DOT de> <1686210011 DOT 20110730161401 AT mtu-net DOT ru> <1065475292 DOT 20110808121457 AT mtu-net DOT ru> In-Reply-To: <1065475292.20110808121457@mtu-net.ru> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEE5CF331862A2C516BFD8BEA" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enigEE5CF331862A2C516BFD8BEA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 08.08.2011 10:14, schrieb Andrey Repin: > Greetings, Sven K=C3=B6hler! >=20 >>> alias vpnup=3D'exec sudo openvpn --config $HOME/config/client.vpn --wri= tepid /tmp/openvpn.pid &' >>> >>> that's where his problem began, IMO. >=20 >> 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. >=20 > You DON'T "feed a path like $HOME/something" ! > The shell that run the script will expand variable before passing it to t= he > 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. --------------enigEE5CF331862A2C516BFD8BEA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4/qCYACgkQ7Ww7FjRBE4C3EACdGOXzsPc9Bye5M9QGhxrmRf7T EAAAn1O64OmQoNV9e+qQq1Yo4HJaljXM =aD7n -----END PGP SIGNATURE----- --------------enigEE5CF331862A2C516BFD8BEA--