Re: /etc/profile.d ?
>>>>> "Lars" == Lars Wirzenius <liw@iki.fi> writes:
Lars> [1 <text/plain>] psu25682@odin.cc.pdx.edu (Karl
Lars> M. Hegbloom):
>> What if we had an /etc/profile.d (not invented here) where
>> packages (like postgresql) could drop a startup file for
>> /etc/profile to source in a for f in /etc/profile.d/* loop?
>>
>> Pros and cons?
Lars> - It's shell specific. Similar stuff would be needed for
Lars> other shells.
RH has an /etc/profile.d, and they've got a snippet for csh and
another for sh for every package that installs something there. The
profile for each shell then loops through and sources the appropriate
snippets, which have suffixes to differentiate them.
Lars> - If the package needs it, it's buggy and should be
Lars> fixed. (The correct way in that case is to make it a
Lars> script wrapper aound the actual program, not assume things
Lars> are done in /etc/profile.)
Yes, that seems like a better way to do things.
Lars> - If the package doesn't need it, it's unnecessary clutter
Lars> that will fill up my root partition and slow up my logins
Lars> needlessly. As sysadmin, I don't want to have to clean up
Lars> stuff like that after every upgrade.
We'd have to write two snippets for every package needing this, and
they'd have to be made idempotent and able to function when a package
is removed leaving config files behind.
Lars> - If it is meant just as an example, put it in
Lars> /usr/doc/*/examples.
Alright.
Lars> In summary, I still (as on some earlier occasions when this
Lars> has been suggested) that the idea is not worth it.
Ok. I trust your wisdom. (Gee, why didn't I think of that, it's so
obvious.)
Thanks, Lars.
Reply to: