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 12-19-2010, 07:01 PM
Ritesh Raj Sarraf
 
Default /etc/profile.d/

Hello,

I was looking at /etc/profile.d/ and was not sure how it was to function.

As per LSB 4.0, every script present in /etc/profile.d/ is executed.


I am thinking of a way to have a system wide shell variable that can be
used and updated by
further newer shell processes.

Like, if I do an `export FOO="bar"` in /etc/profile.d/foo.sh, is it okay
to assume that $FOO will be available
throughout the OS as a system variable ?
Currently, on sid, it does not seem to be executed.

--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
 
Old 12-20-2010, 07:41 AM
Josselin Mouette
 
Default /etc/profile.d/

Le lundi 20 décembre 2010 * 01:31 +0530, Ritesh Raj Sarraf a écrit :
> I was looking at /etc/profile.d/ and was not sure how it was to function.
>
> As per LSB 4.0, every script present in /etc/profile.d/ is executed.

> I am thinking of a way to have a system wide shell variable that can be
> used and updated by
> further newer shell processes.

Please don’t use profile.d to do that. Nothing guarantees you that this
variable will be available everywhere.

This is precisely the reason why I’d rather we didn’t have such a
feature, since it inevitably gets misused in such a way - as it has been
for years by ISVs on Red Hat.

Cheers,
--
.'`. Josselin Mouette
: :' :
`. `' “If you behave this way because you are blackmailed by someone,
`- […] I will see what I can do for you.” -- Jörg Schilling
 
Old 12-20-2010, 07:55 AM
Ritesh Raj Sarraf
 
Default /etc/profile.d/

On 12/20/2010 02:11 PM, Josselin Mouette wrote:
> Please don’t use profile.d to do that. Nothing guarantees you that this
> variable will be available everywhere.
>
> This is precisely the reason why I’d rather we didn’t have such a
> feature, since it inevitably gets misused in such a way - as it has been
> for years by ISVs on Red Hat.

Yes. I later looked more to find out bug reports on why this was
discouraged.

Since my application has multiple invocations based on udev events, I
instead resorted to using locks.

But that makes me ask: What is LSB there for ? I had looked at the
latest spec and this issue was resolved/deprecated in Debian long back.
Shouldn't they look into the rationale provided by Debian ?

Thanks,
Ritesh

--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
 

Thread Tools




All times are GMT. The time now is 07:03 PM.

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