[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: run-parts for /etc/profile?

On 18.11.1998., at 20:42, Marc.Haber-lists@gmx.de wrote: 

>Debian relies heavily on run-parts which I consider a very useful tool
>to aid packages in installing extensions to standard config files like
>cron.daily. For me, the logical step would be having an /etc/profile
>containing something like run-parts /etc/profile.d and having packages
>install their environment changes etc. in special scripts in
>Is there a special reason why this hasn't been done?

People (maintainers) have on several occassions asked for some way
of editing *sh initialization scripts with instalations of packages.
Of course, it can be done from postinst, but it doesn't look like
a policy compliant thing to do, to me. And you can't supply an
/etc/profile with bash (or any other equivalent file for equivalent shell),
that will include every little variable set by some package - that is a bit
silly, isn't it? IMHO the whole thing is very opaque, because there are
so many shells and most of them use their own configuration files,
even more of them (files) for one general purpose.
This is going to be hard work if anyone is willing to do it, but it can
certainly be done, in a various ways: 
 - similar to the menu system (if you could adopt so many window
   managers, shells will be nothing to it ;),
 - using /etc/environment, maybe something like /etc/inetd.conf
   updating (note that I don't know anything about it, I've just seen
   that file updated),
 - like Marc says, using run-parts,
 - some other method?

So, what's it going to be?

Also, one other idea: /etc/aliases files that come with various mailer
daemons all have aliases like 'disk: root' and such, that sounds a bit
silly, but there is a limited number of aliases in this file that are
by programs, so it's reasonable. But there is a problem - these aliases
are not inserted on an upgrade of that file (if it already has them).

For example: on a fresh install, the default file gets installed. Fine.
But, if there is some admin that will erase the default file, and put
only his own aliases that do not include those from the default file,
and every time when his mailer daemon gets updated, dpkg will ask
him does he wish to overwrite - and he'll most probably say no -
and the default aliases will never get to his /etc/aliases file.

It shouldn't be such a hard thing to do, someone with sufficient
knowledge of sed/awk/whatever can do it.

enJoy -*/\*- http://jagor.srce.hr/~jrodin/

Reply to: