Skip to Content.
Sympa Menu

sm-users - [SM-Users] environment variables and preloads

sm-users AT lists.ibiblio.org

Subject: Sourcemage Users List

List archive

Chronological Thread  
  • From: Hamish Greig <hgreig AT bigpond.net.au>
  • To: "Source Mage - Users" <sm-users AT lists.ibiblio.org>
  • Subject: [SM-Users] environment variables and preloads
  • Date: Sun, 7 Dec 2003 10:52:01 +1100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

looking at a lot of the bugs generated by prometheus, it appears quite a few
spells are adding lines to /etc/profile. but not removing them after dispel.
To safely add lines and then remove them takes a POST_INSTALL and POST_REMOVE
file.
Another, simpler, less complicated way would be to add
"for file in /etc/profile.d/* ; do . $file ; done"
to the /etc/profile file (most probably in bash spell)
then all the spells that want to set preloads or vars can just install a file
to /etc/profile.d/* and it will be sourced at login.
Later if the spell is dispelled, /etc/profile will remain untouched and the
file in /etc/profile.d/ will be removed, no POST_INSTALL or POST_REMOVE
needed.
This would be a much cleaner implementation of login variable/preload setting.
A few of us talking on IRC thought this would be a good thing to implement in
the short term, and as I am off work for a few days I could do this (and
close a few trivial prometheus bugs at the same time), but wanted feedback
from others before making such a major change.
Anyone object to this?
Anyone want a better explanation ?
Anyone see problems for non-bash shell users (do we care about them
anyway ?) ?
Anyone see any simple flaw we overlooked in discussion on IRC ?
Hamish
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/0mul8fSufZR6424RAqKUAKCPqVqzOLtlGmwRvwzYZQKx4vol8ACgikRq
u4eq7w2A9b5zl0yV3Rm/XzY=
=oe40
-----END PGP SIGNATURE-----





Archive powered by MHonArc 2.6.24.

Top of Page