![](https://seccdn.libravatar.org/avatar/519d17ce2fff16336e7a07ce8ccd4609.jpg?s=120&d=mm&r=g)
Am Montag, 23. März 2020, 12:53:01 CET schrieb Axel Braun:
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.
How advised you to do this?
So how is the procedure? create a new file myaddons.sh, write the above stuff into it and it gets processed/pulled-in automatically?
The only usable way to define your own aliases system-wide is with /etc/ bash.bashrc.local. You may want to have a look: https://build.opensuse.org/package/show/home:frispete:Tumbleweed/etc-LISA where I tried to implement a save way to deal with that situation. In short, add a calling stub to /etc/bash.bashrc.local with markers in %post and remove it again in %postun. From there, you have every freedom, you like. ;-) Cheers, Pete -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org