Hello Andrei and Werner, Am Montag, 23. März 2020, 14:32:03 CET schrieb Andrei Borzenkov:
23.03.2020 15:18, Dr. Werner Fink пишет:
On 2020/03/23 12:53:01 +0100, Axel Braun wrote:
Hi,
I used to write some alias into /etc/bash.bashrc.local :
%pre #Write environment changes to /etc/bash.bashrc.local cat > /etc/bash.bashrc.local << "EOF" alias cdutil='cd /usr/bin' #(and some more...) EOF
Now I was advised to use /etc/profile.d instead. This directory contains a bunch of non-executable files ending on sh, .csh, .ssh etc.
So how is the procedure? create a new file myaddons.sh, write the above stuff into it and it gets processed/pulled-in automatically?
Add your myaddons.sh and if possible (that is test it out in tcsh!!!) a myaddons.csh with your alias to the file list of your package.
That would have been wasier than expeted....but....
Given, that
1. aliases cannot be exported, so even though /etc/profile(.d) is processed by GUI session startup script, aliases that are defined there are never seen by any child process
2. shells started in GUI session are usually started as non-login shell and so do not process /etc/profile(.d)
3. even if shell is started as login shell, SUSE guards /etc/profile(.d) against multiple processing by exporting PROFILEREAD which gets exported during session startup, so /etc/profile(.d) in any login subshell is not processed either
using /etc/profile.d for the purpose of defining aliases sounds rather pointless.
So what is your recommendation for this? Thanks Axel -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org