LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2010, 12:27 AM   #1
Linux_Nataraj
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
Question Profile in SUSE9.3


Profile is getting called twice for every login change. Interestingly when i use SU, it is invoked once only. Do any one have a solution - how to set profile to be called only once.
 
Old 03-24-2010, 01:54 AM   #2
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
Are you talking about /etc/profile, or .profile ? Which shell are you using? What makes you think profile is being called more than once?
 
Old 03-24-2010, 05:49 AM   #3
Linux_Nataraj
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kakaka View Post
Are you talking about /etc/profile, or .profile ? Which shell are you using? What makes you think profile is being called more than once?
I mean /etc/profile. I am using bash shell. I am calling a shell script in profile, which calls an executble writing current timestamp into a file. I am seeing 2 lines with the same timestamp. This is happening only when I logout and login on suse9.3.

I tried similar example in suse 10.2, but there i am able to see only 1 line of timestamp.

Thank you.
 
Old 03-24-2010, 05:15 PM   #4
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
AH! Thanks. The mention of the logging jogged my memory.

I had the same problem. I added logging to *ALL* the related system and User level scripts to try to track down the problem.

*If* I recall correctly the main impact was slowing down things like logging in a little, and multiply "stuffing" my PATH variable because I concatenated the default OS provided PATH value with my own values. I had several directories for a variety of tools that I was using. Altogether in all the directories, there were *MANY* files. Because the startup scripts were being executed multiple times, my PATH variable would have at least two copies of the list of directories I intended to be in it. So if something was searching the PATH for a command that it ultimately wasn't going to find, it took a VERY long to discover that it wasn't there.

I believe there is an environment variable, I'm tempted to say it is something like "PROFILEREAD", that was supposed to prevent that.

Even if it's just an annoyance, it shouldn't happen, because the order of invocation of profile/login/etc. scripts, is documented in the man pages for some of the shells, especially bash.

Unfortunately, since a lot of people are using much more current suse releases like 11.x, I believe the 9.* versions have sort of fallen off the radar for checking bugs. But I'll check...bug # 167306 in Novell's Bugzilla makes mention of the problem, so it is a known issue that was ostensibly fixed.

I think I did some brute force solution like set my own environment variable that the existing scripts in /etc don't about, and so don't manipulate. I then checked for the presence and value of that variable to prevent multiply executing the scripts.

Hope this helps.
 
  


Reply

Tags
profile, suse93, twice



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dbetween SUSE9.0 & SUSE9.3? chandu2904 Linux - Software 1 10-12-2007 10:56 AM
Where can I read about the difference between "..profile" and ".profile"? zorrokan Linux - Newbie 4 09-05-2007 01:26 AM
system profile vs user profile bonito SUSE / openSUSE 3 06-28-2006 01:02 PM
non roaming profile on a roaming profile system fieldyweb Linux - Newbie 1 10-03-2005 12:27 PM
suse9 lil213 Linux - General 3 01-18-2004 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration