| View previous topic :: View next topic |
| Author |
Message |
trapni Developer

Joined: 16 May 2002 Posts: 251 Location: Germany/Berlin
|
Posted: Mon Jul 01, 2002 10:24 pm Post subject: $PATH and /usr/local/bin !!!! |
|
|
Hi all,
I'm not really complaining, although I'd rate it as a bug but it really *peep*.
It's usually to have /usr/local/bin before /usr/bin and /usr because there are all local binaries stored special for this machine.
This was successfully done on my old SuSE box. But Gentoo enforces the $PATH to have "/bin:/usr/bin" to be definitely the first in the search path. That sucks. since you can't override things located there by default.
Image colorgcc. You've normally gcc placed in /usr/bin and want now all output piped through colorgcc. So you usually create a symlink from /usr/bin/colorgcc to /usr/local/bin/gcc (and g++, and what ever you like). This is okay unless you don't need it. really need it. because /usr/local/bin/gcc gets never called since /usr/bin/gcc is definitely before found.
Okay, I can modify the /etc/profile or /etc/profile.env. But what about suggesting a /etc/profile.local (or /etc/conf.d/profile.local wich gets invoked by /etc/profile after everything system like is done. So that I am the master in /etc/conf.d/profile.local and can then override everything I need.
Thanks,
Christian Parpart. |
|
| Back to top |
|
 |
delta407 Bodhisattva


Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Mon Jul 01, 2002 10:26 pm Post subject: |
|
|
| trapni wrote: | | Okay, I can modify the /etc/profile or /etc/profile.env. |
Yes, you can.  |
|
| Back to top |
|
 |
trapni Developer

Joined: 16 May 2002 Posts: 251 Location: Germany/Berlin
|
Posted: Mon Jul 01, 2002 10:27 pm Post subject: |
|
|
Why I'm suggesting the file /etc/conf.d/profile.local is because there is more than colorgcc to be invoked at a new session for each user.
e.g. alias ls='ls --color=auto' etc.
Regards,
Christian Parpart. |
|
| Back to top |
|
 |
trapni Developer

Joined: 16 May 2002 Posts: 251 Location: Germany/Berlin
|
Posted: Mon Jul 01, 2002 10:57 pm Post subject: |
|
|
| delta407 wrote: | | trapni wrote: | | Okay, I can modify the /etc/profile or /etc/profile.env. |
Yes, you can.  | But is it really thought to be so? I don't think so. /etc/profile.env is vor environment variables only, /etc/profile does lots of stuff, but upgrading your system is much easier if you can keep your own stuff together (i.e. in /etc/profile.local wich gets invoked by /etc/profile before he exists)
Isn't it????
Christian Parpart. |
|
| Back to top |
|
 |
delta407 Bodhisattva


Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Mon Jul 01, 2002 11:08 pm Post subject: |
|
|
So then add:
| Code: | if [ -e "/etc/profile.local" ]
then
source /etc/profile.local
fi |
To your /etc/profile  |
|
| Back to top |
|
 |
trapni Developer

Joined: 16 May 2002 Posts: 251 Location: Germany/Berlin
|
Posted: Tue Jul 02, 2002 12:06 am Post subject: |
|
|
Yeah right. But couldn't we add that feature(!) to the distro it self? (instead of reediting it on each update)?
Thanks,
Christian Parpart. |
|
| Back to top |
|
 |
|