delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/19/17:11:09

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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 19 Sep 2003 17:10:55 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Hannu E K Nevalainen (garbage mail)" <garbage_collector AT telia DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: /etc/profile - futile try to predict order of execution
Message-ID: <Pine.GSO.4.56.0309191710080.12411@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Fri, 19 Sep 2003, Hannu E K Nevalainen (garbage mail) wrote:

> While looking for the reason why "less" has stopped understanding the
> BACKSPACE key (and a bunch of others) I stumbled over the following.
>
> I'm sending this just to INFORM about it.
> I'm NOT on the xfree list.
> I'm NOT interested of participating in more discussions on this subject.
>
> > $ head -63 /etc/profile | tail -1
> >         `/bin/find /etc/profile.d -iname '*.sh' -type f`
> >
> > $ /bin/find /etc/profile.d -iname '*.sh' -type f
> > /etc/profile.d/lilypond-profile.sh
> > /etc/profile.d/mc.sh
> > /etc/profile.d/openssl.sh
> > /etc/profile.d/00xfree.sh
>
>  NOTE that 00xfree is listed last...
>  THEN read what the comment in the first lines of the script says.
>
> > $ cat /etc/profile.d/00xfree.sh
> > # the script name starts with 00 to ensure that it is executed before any
> > # other scripts because one of them may need to know where X is to run
> > # properly.
> >
> > X11PATH="/usr/X11R6/bin"
> >
> > if ! /bin/echo ${PATH} | /bin/grep -q ${X11PATH} ; then
> >     export PATH="${PATH}:${X11PATH}"
> > fi
> >
> > $

IMO, this belongs on the cygwin list, as this concerns the predictability
of the script execution order from /etc/profile.

Hannu, this is really weird.  I'm getting 00xfree.sh as the *first* file
match:

$ /bin/find /etc/profile.d/ -iname '*.sh' -type f
/etc/profile.d/00xfree.sh
/etc/profile.d/mc.sh
/etc/profile.d/openssl.sh
$

WAGs:

Could this be the result of a different collation sequence in your
language?  Can you try running "LC_ALL=C /bin/find /etc/profile.d -iname
'*.sh' -type f" on your machine?

Speaking of your machine, could this be because you're using Win98?
(Checking) Bingo!  Somehow, on Win98 find traverses files in unsorted
order, i.e., the order they were created.  I guess either /etc/profile
should guarantee alphanumeric order, or maintainers need to reassess their
assumptions.
        Igor
-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_                pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_            igor AT watson DOT ibm DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019