FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 07-04-2011, 10:33 AM
Lars Wirzenius
 
Default how to divert /etc/profile?

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

--
Freedom-based blog/wiki/web hosting: http://www.branchable.com/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110704103348.GA20009@havelock.liw.fi">http://lists.debian.org/20110704103348.GA20009@havelock.liw.fi
 
Old 07-04-2011, 04:28 PM
Harald Dunkel
 
Default how to divert /etc/profile?

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

On 07/04/11 12:32, Timo Weingärtner wrote:
> Hi Harald,
>
> Am Montag, 2011-07-04 schrieb Harald Dunkel:
>> I would like to install a private package diverting /etc/profile (to support /etc/profile.d). Problem: There is no owner for this file.
>>
>> What would you suggest?
>>
>>
>> Any helpful comment would be highly appreciated.
>
> See /usr/share/doc/base-files/README.
>

I am running Debian since Hamm, but I never recognized
/usr/share/base-files before. Many thanx.


Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4R6joACgkQUTlbRTxpHjf4YgCgiQZ/lb4cxxTbyiK6Y00C3qp/
sBkAn19u9eVihzkudurrurlxuYpvP1if
=cimK
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E11EA3A.3000802@afaics.de">http://lists.debian.org/4E11EA3A.3000802@afaics.de
 
Old 07-05-2011, 09:39 AM
Thilo Six
 
Default 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



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: iuum42$fo4$1@dough.gmane.org">http://lists.debian.org/iuum42$fo4$1@dough.gmane.org
 

Thread Tools




All times are GMT. The time now is 12:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org