Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Mon, 15 Sep 2003 12:47:13 -0400 (EDT)
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: Ralf Habacker <ralf.habacker@freenet.de>
cc: cygwin@cygwin.com
Subject: Re: [PATCH] package base-files: fix no global set of profile.d
 settings 
In-Reply-To: <CMEOLNOLLCGCMPJLBKJPAEMJIDAA.ralf.habacker@freenet.de>
Message-ID: <Pine.GSO.4.56.0309151245350.12411@slinky.cs.nyu.edu>
References: <CMEOLNOLLCGCMPJLBKJPAEMJIDAA.ralf.habacker@freenet.de>
Importance: Normal
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 15 Sep 2003, Ralf Habacker wrote:

> Hi,
>
> the base-files package release 2.2-1 contains an error, which prevents
> global setting environment vars of profile.d scripts.
> The problem is in the line
>
> /bin/find /etc/profile.d -iname '*.sh' -type f | while read f; do
>
> the pipe seems to create a subshell, which limits the live time of the
> environment vars of the profile.d scripts to the end of the done statement.
> (see below)
>
> # Run all of the profile.d scripts
> # Note that these are supplied by separate packages
> /bin/find /etc/profile.d -iname '*.sh' -type f | while read f; do
>   if [ -f "$f" ]; then
>     . "$f"
>   fi
> done
> ##>> here no profile.d env vars set
>
> Cheers
> Ralf
>
>
>
> ChangeLog
>
> 2003-08-23  Ralf Habacker  <ralf.habacker@freenet.de>
>
>         * etc/defaults/etc/profile: Fix problem not setting
>         environment vars through profile.d scripts.
>
>
> $ diff -up etc/defaults/etc/profile.old  etc/defaults/etc/profile
> --- etc/defaults/etc/profile.old        2003-09-15 14:19:46.000000000 +0200
> +++ etc/defaults/etc/profile    2003-09-15 14:20:14.000000000 +0200
> @@ -47,7 +47,7 @@ fi
>
>  # Run all of the profile.d scripts
>  # Note that these are supplied by separate packages
> -/bin/find /etc/profile.d -iname '*.sh' -type f | while read f; do
> +for f in `/bin/find /etc/profile.d -iname '*.sh' -type f`; do
>    if [ -f "$f" ]; then
>      . "$f"
>    fi

Ralf,

This has already been reported (and should be fixed in the next release of
base-files).  You should be able to find the relevant messages in the
cygwin-apps archives.  FYI, your patch is not space-in-filename-friendly.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

