Re: /etc/profile not being run


Subject: Re: /etc/profile not being run
From: Paul J. Lucas (pauljlucas@mac.com)
Date: Sun Feb 25 2001 - 11:46:49 MST


On Sun, 25 Feb 2001, Hollis R Blanchard wrote:

> I don't know how to resolve this aside from not using runlevel 5.

        ... which is one reason I never use it. Other than a pretty
        login screen, it serves no purpose.

> This will be annoying in the case of runlevel 3 however, since if you have
> something like the following in your .bash_profile (or /etc/profile):
> export PATH=$PATH:/usr/local/bin
> then /usr/local/bin will be appended to your path twice - once on console
> login, and again when you start a terminal in X (environment variables are
> inherited).

        Your profile should always be reentrant regardless. I do this:

                [ -z "$PATH0" ] && export PATH0=$PATH
                export PATH=$PATH0:<whatever>

        PATH0 is PATH as it is given to you by /etc/profile and it gets
        set exactly once.

        - Paul



This archive was generated by hypermail 2a24 : Sun Feb 25 2001 - 11:46:54 MST