delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-Id: | <200308160900.KAA26421@aps5.ph.bham.ac.uk> |
Date: | Sat, 16 Aug 2003 09:58:54 +0100 (BST) |
From: | "Dr.D.J.Picton" <dave AT aps5 DOT ph DOT bham DOT ac DOT uk> |
Reply-To: | "Dr.D.J.Picton" <dave AT aps5 DOT ph DOT bham DOT ac DOT uk> |
Subject: | Re: Various shell problems |
To: | cygwin AT cygwin DOT com |
MIME-Version: | 1.0 |
> Date: Fri, 15 Aug 2003 14:23:06 -0400 > From: Larry Hall <cygwin-lh AT cygwin DOT com> > To: "Dr.D.J.Picton" <dave AT aps5 DOT ph DOT bham DOT ac DOT uk> > CC: cygwin AT cygwin DOT com > Subject: Re: Various shell problems > Content-Transfer-Encoding: 7bit > x-scan-bham: no > > Dr.D.J.Picton wrote: > > > > 3. /bin/sh sources /etc/profile when called from ftp.exe > > If SHELL isn't exported or is set to /bin/sh, ftp.exe uses the /bin/sh > > shell for shell escapes. Unfortunately the working directory of the shell > > is then always set to the user's home directory. Now I know why - for > > some reason, /bin/sh thinks it's a login shell and sources the profile. Here is my fix to /etc/profile to circumvent the problem. All the code is skipped if it detects that the profile has already been run, and argument zero is set to "-sh": At the start of the file: # fix for ftp problem ... if [ -z "$PROFILE_ALREADY_DONE" -o "$0" != "-sh" ]; then export PROFILE_ALREADY_DONE=1 At the end of the file: fi -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |