Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] different types of shell scripts
Hello,

On Sat, 24 Sep 2011, Lars Müller wrote:
On Sat, Sep 24, 2011 at 03:58:46PM +0200, David Haller wrote:
On Sat, 24 Sep 2011, Lars Müller wrote:
On Sat, Sep 24, 2011 at 12:36:20AM +0200, David Haller wrote:
[ 8< ]
I'm not 100% sure if that's the 11.4 default, as this is an upgrade
from 11.1 via 11.2 and that file might have been kept.

grep CWD_IN_ /var/adm/fillup-templates/sysconfig.suseconfig
CWD_IN_ROOT_PATH="no"
CWD_IN_USER_PATH="yes"

For openSUSE 11.4 and Factory.

Thank you!

So the default hasn't changed yet. I think it should. NOW! Let's have
a default of (implicitly)

CWD_IN_USER_PATH="no"

with 12.2 at latest. Oh, what I don't remember[1] is at what position
"." got added to PATH if that variable was set to "yes".

Are you getting more and more lazy? Must be the age. ;)

Quite likely. I am and always were and are lazy. And/or the fact that
I'm 30+hrs awake ;)

From /etc/profile.d/profile.sh

CWD_IN_USER_PATH=*)
test "$val" = "yes" || continue
test $UID -ge 100 && PATH=$PATH:.

Ah :)

If last, just
get rid of it, if first, change it to "last" with 12.1. That stupidity
has stuck around far far too long already. Those who want to shoot
themselves can still use it by setting CWD_IN_USER_PATH to "yes" ;)

I suggest to keep it simple stupid and to change the default of
CWD_IN_USER_PATH to no

Jep. Seconded. What I was saying.

Oh, and BTW: I plead for removing the variable for root altogether.
root should _never ever_ have "." in his PATH.

@Rudi: As you added CWD_IN_USER_PATH only ten years back you might still
remember why these two settings are needed. ;)

Hm. I'm rather sure that there was something like that (somewhere in
/etc/rc.config?) in SuSE 6.2 ('99) and before. Ah, yes, in the backup
of my ex-6.2 box (the infamous one ;) I find:

==== etc/rc.config ====
# Do you want to have "." in root path? This is not recommended, but
# many people do prefer it (yes/no).
#
CWD_IN_ROOT_PATH="no"
====

and commented out by me:

==== etc/profile ====
## Moved to profile.local
####
# PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin[:...?]
[..]
# test "$UID" = 0 || PATH="$PATH:."
# export PATH
####
====

Both files from my 6.2 install (around Aug. 16, 1999).

So, CWD_IN_USER_PATH was probably introduced for "backward
compatibility".

-dnh

--
"Powered-up hardware and sweat do not mix." -- Simon Cozens
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >