[Bug 232059] New: alias not working with tcsh in /etc/profile.d
https://bugzilla.novell.com/show_bug.cgi?id=232059 Summary: alias not working with tcsh in /etc/profile.d Product: SUSE Linux 10.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: vogt@itwm.fraunhofer.de QAContact: qa@suse.de Hello, during SuSE 9.0 and SuSE 10.1 the /etc/profile mechanism got reworked. Take the package "mc" for example. This package contains the file /etc/profile.d/mc.csh This file defines an "alias".
cat mc.csh: alias mc 'source /usr/share/mc/bin/mc-wrapper.csh'
If you log into KDE over KDM this alias is not set. alias | grep mc -> nothing It works if you login from remote over ssh or if you start the shell by hand, but not "by default" on login over kdm. Result: its not possible to define an alias with the /etc/profile.d mechanism for tcsh when the user logs in. This is of course a minor bug. Currently I need this alias mechanism for the package "Modules", mc is nice for debugging, but not my real problem. Most likely the bug is true for 10.2 as well. The package for the login mechanism is aaa_base. I debuged it a bit for me it seems tcsh evaluates the login procedure twice, the first one sets the alias the second run then deletes/overwrites them, but I was unable to nail that down. regards, Martin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=232059 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |ro@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=232059 ro@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|ro@novell.com |werner@novell.com ------- Comment #1 from ro@novell.com 2007-01-26 08:41 MST ------- -> tcsh expert -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=232059 werner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@novell.com AssignedTo|werner@novell.com |nadvornik@novell.com ------- Comment #2 from werner@novell.com 2007-01-29 07:53 MST ------- This has nothing todo with tcsh, simply we do not set aliases within /etc/profile.d/ because an alias can not be exported. Within /etc/profile.d/ and /etc/profile (bash) or /etc/csh.login (tcsh) we set all environment variables at login for sub prcoesses, nothing more and nothing less, all other things like aliases will be set within /etc/bash.bashrc (bash) or /etc/csh.cshrc (tcsh) for each shell. If mc requires an alias for its self it should use mc.bin and a real wrapper script. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=232059 ------- Comment #3 from vogt@itwm.fraunhofer.de 2007-01-30 01:57 MST ------- Hello, yes, but at least it is not consistent. bash-> alias is there tcsh-> no alias The way to define alias could be reworked as well. In csh.cshrc.org # # Local configuration # if ( -r /etc/csh.cshrc.local ) source /etc/csh.cshrc.local One file, cannot easily be modifed by rpm pakets/paket managers. Maybe to something like this: for s in /etc/aliases.csh/*.sh ; do test -r $s && . $s done But this should be a common Linux mechanis. Maybe something for LSB? Martin -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=232059 nadvornik@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |werner@novell.com ------- Comment #4 from nadvornik@novell.com 2007-01-30 03:03 MST ------- mc prints something like "cd last_working_directory" at exit, which should be executed in the current shell. Werner, what is the correct way to add an alias to /etc/bash.bashrc and /etc/csh.cshrc? Does it have to be added to aaa_base package? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=232059 ------- Comment #5 from werner@novell.com 2007-01-30 03:32 MST ------- @Martin: currently in /etc/profile.d/ only the environment is set. AFAIK this even this is not specified in LSB. Exporting aliases or shell functions is bash specific which means even a normal POSIX bourne shell can not do this. And yes we may extend the /etc/profile.d/ for other things which normally are not exported. Otherwise we would parse all files found in /etc/profile.d/ twice first at login then for every interactive shell not a login shell. @Vladimir: Hmmm ... I'd like to have such things package specific. Always adding or removing from /etc/bash.bashrc and /etc/csh.cshrc is not the way which should we go (IMHO). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=232059
Andreas Jaeger
participants (1)
-
bugzilla_noreply@novell.com