Re: how to divert /etc/profile?
Lars Wirzenius wrote the following on 04.07.2011 12:33
Hello
> On Mon, Jul 04, 2011 at 11:50:58AM +0200, Harald Dunkel wrote:
>> I would like to install a private package diverting
>> /etc/profile (to support /etc/profile.d). Problem:
>> There is no owner for this file.
>
> Stock Debian already supports /etc/profile.d.
>
> if [ -d /etc/profile.d ]; then
> for i in /etc/profile.d/*.sh; do
> if [ -r $i ]; then
> . $i
> fi
> done
> unset i
> fi
>
May i add that '/etc/profile' is one of those files that are never automatically
touched when installed once.
,----[ /usr/share/doc/base-files/README ]--------
Q. After upgrading my system recently, I noticed that some files from
base-files do not match the ones which are installed on a fresh install
of squeeze. Should I not be warned about that?
A. Those files are configuration files, so they are completely under
the control of the system admin. The files installed by base-files are
just defaults. Changes in the default files are not important enough
to warn the user, as it is also policy that prompting should be
reduced to a minimum. This is also the reason they are not handled via
dpkg's conffile mechanism.
In either case, if you want to "upgrade" those files, just look at the
postinst for base-files (i.e. /var/lib/dpkg/info/base-files.postinst)
and you will see how they are created and where their master copies are:
install_from_default /usr/share/base-files/nsswitch.conf /etc/nsswitch.conf
install_from_default /usr/share/base-files/dot.profile /root/.profile
install_from_default /usr/share/base-files/dot.bashrc /root/.bashrc
install_from_default /usr/share/base-files/profile /etc/profile
install_from_default /usr/share/base-files/motd /etc/motd
So, if you want your system to be as similar as possible to a newly
installed squeeze system, you might want to sync these files manually.
`---------------------------------------------
So basically since squeeze stock Debian has support for '/etc/profile.d' but
when Debian has been installed with an earlier version and had been
{dist,full}-upgraded this isn't the case.
The admin has to take manual action first.
--
bye Thilo
4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F
Reply to: