Bugzilla – Attachment 56211 Details for
Bug 131964
tcsh config numerous problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
some tcsh config fixes
tcsh-conf.diff (text/plain), 3.29 KB, created by
Volker Kuhlmann
on 2005-11-02 05:56:22 UTC
(
hide
)
Description:
some tcsh config fixes
Filename:
MIME Type:
Creator:
Volker Kuhlmann
Created:
2005-11-02 05:56:22 UTC
Size:
3.29 KB
patch
obsolete
>SUSE 10.0 default > >This patch fixes problems: > >* Various ~/ were not expanded due to a misplaced unset noglob. > Main symptom: $HOME/bin is missing in PATH. > If the reason for the bad placement was to ensure safe quoting of variables, > then the correct solution is to use $var:q. > >* System paths (.../sbin) are concatenated to $PATH in the wrong place. As all > the .../sbin have to be prepended and all the .../bin appended, another temp > variable is required. > >The following problems are *NOT* fixed: > >* The setting of environment variables, most notably PATH, is different to the > settings applied to bash. I don't think there was a SUSE release ever where > things were right, so it's about time to get organised. > > For two users login in, one with chsh /bin/sh and the other with chsh > /bin/tcsh, I expect to see identical output of env. I don't think anyone has > ever tested this at SUSE. > >* The braindead tcsh design decision of running login after cshrc renders login > essentially useless for environment variable settings, as some of them are > already required in cshrc - most notably PATH. > >* Using csh.login for setting PATH is never any good, as PATH needs also be set > for non-login shells. Try ssh remotehost env for a nasty surprise. > >* Programs like rsh, rcp, and ssh DO NOT RUN A LOGIN SHELL. See e.g. ssh > remotehost mozilla for why this is a problem on SUSE. > >* It is arguable whether aliases, prompt etc should be defined for > non-interactive shells, but terminal setups should be skipped. > >* Do not use the /bin/sh setup for setting PATH etc in tcsh. For starters, PATH > gets longer with each subshell, and it never works anyway for users which have > tcsh as their login shell (chsh). > >* There are interactive non-login shells, interactive login shells, > non-interactive non-login shells, and possibly non-interactive login shells. > It's a pity that nobody ever really manages to take care of that for tcsh. For > bash it seems to just work. I believe it's a case of programmer PEBKAC, not a > shortcoming of tcsh. > >Volker Kuhlmann, 2 Nov 2005 > > >--- /etc/csh.login.orig 2005-08-18 04:02:45.000000000 +1200 >+++ /etc/csh.login 2005-10-30 10:48:12.000000000 +1300 >@@ -26,13 +26,15 @@ > setenv MAIL /var/spool/mail/$USER > set mail=$MAIL > endif >+unset noglob > > set _xpath >-set _tpath >+set _upath >+set _spath > if ( "$uid" == "0" ) then >- if ( -d /opt/gnome/sbin ) set _tpath=( /opt/gnome/sbin ) >- if ( -d /opt/kde3/sbin ) set _tpath=( /opt/kde3/sbin $_tpath ) >- set _tpath=( /sbin /usr/sbin /usr/local/sbin ) >+ if ( -d /opt/gnome/sbin ) set _spath=( /opt/gnome/sbin ) >+ if ( -d /opt/kde3/sbin ) set _spath=( /opt/kde3/sbin $_spath ) >+ set _spath=( /sbin /usr/sbin /usr/local/sbin $_spath ) > endif > foreach _d (~/bin/$MACHTYPE ~/bin \ > /var/lib/dosemu \ >@@ -45,7 +47,7 @@ > /usr/openwin/bin \ > /opt/cross/bin \ > /usr/andrew/bin ) >- if ( -d $_d ) set _tpath=( $_tpath $_d ) >+ if ( -d $_d ) set _upath=( $_upath $_d ) > end > > if ( ${?OPENWINHOME} ) then >@@ -61,17 +63,17 @@ > set _xpath=( /usr/X11/bin $_xpath ) > endif > >-set _tpath=( $_tpath $_xpath ) >+set _upath=( $_upath $_xpath ) > > # > # Doing only one rehash > # >-set -f path=( $_tpath $path ) >+set -f path=( $_spath $path $_upath ) > >-unset _tpath >+unset _spath >+unset _upath > unset _xpath > unset _d >-unset noglob > > # > # SuSEconfig stuff
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 131964
: 56211