Strange double invocation of /etc/profile
Hi gang.
Hey, for those of you who are much more savvy with SUSE's boot/init process, I'd certainly appreciate your insight into what I consider to be a somewhat strange phenomenon that occurs within my 9.3 Pro distro.
After I successfully completed a full install of the new SUSE 9.3 Pro distro a week or so ago, I immediately went about doing some of the usual things to customize my bash shell environment, such as add my own alias definitions, PATH variable settings, etc. In doing so, I noticed that things didn't seem to be operating as I intended. Specifically, the behavior my of local ".profile" file seemed to be kinda strange. In order to try and find out what was happening, I added some simple "echo" commands to the following files :
/etc/profile
/etc/profile.local
/etc/bash.bashrc
/etc/bash.bashrc.local
/home/joeblow/.profile
/home/joeblow/.bashrc
Note : The username "joeblow" is just a pseudonym that I'm using for this open forum.
The simple "echo" commands print out some text strings to a file within my home directory. After rebooting my machine, here's the sort of thing I'm seeing :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following messages were generated *after* a reboot :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a note from the START of file /etc/PROFILE
PPID = 6603
This is a note from file /etc/PROFILE.LOCAL
This is a note from the START of file /etc/BASH.BASHRC
This is a note from file /etc/BASH.BASHRC.LOCAL
This is a note from the END of file /etc/BASH.BASHRC
This is a note from file /home/joeblow/BASHRC
This is a note from the END of file /etc/PROFILE
PPID = 6603
This is a note from file /home/joeblow/PROFILE
Variable Test : PROFILEREAD = |true|
PPID = 6603
This is a note from the START of file /etc/PROFILE
PPID = 6603
This is a note from file /etc/PROFILE.LOCAL
This is a note from the START of file /etc/BASH.BASHRC
This is a note from file /etc/BASH.BASHRC.LOCAL
This is a note from the END of file /etc/BASH.BASHRC
This is a note from file /home/joeblow/BASHRC
This is a note from the END of file /etc/PROFILE
PPID = 6603
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The thing that's causing me to scratch my head is that, for some reason, /etc/profile is being run twice, which doesn't make a whole lot of sense to me. From the above listing, you'll note that as soon as my local ".profile" has finished being executed, /etc/profile is re-run. At first, I thought this was due to some strange and/or un-necessary command within my local ".profile", but, after checking things, this doesn't appear to be the case. As far as I can tell, there is some other process that, for whatever reason, is causing the invocation of /etc/profile a 2nd time, which kinda messes up my own local environment settings. Obviously, I'm not understanding something here, but it just doesn't seem to me that /etc/profile needs to be called twice.
Also from the above listing, you'll note that I was looking at the "PPID" variable in an attempt to try and determine what process might be responsible for this "dual invocation". Based upon the PPID that was printed out, I used the "ps -ef" command to take a look at the running processes on my computer. Note the following :
root 6558 1 0 11:47 ? 00:00:00 /opt/kde3/bin/kdm
root 6582 6558 2 11:47 ? 00:00:11 /usr/X11R6/bin/X -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-yV5m6C
root 6602 1 0 11:47 ? 00:00:00 /usr/sbin/hald --daemon=yes
root 6603 6558 0 11:47 ? 00:00:00 -:0
Note that process 6603 has a very strange name (the "-:0" thingy) and that it is spawned by process 6658, which belongs to the KDE stuff. I'm wondering if KDE is kicking off /etc/profile a 2nd time, and, if so, if it's really necessary. Perhaps the KDE windowing stuff does, indeed, require some sort of double invocation of some of the bash enviroment stuff.
This is not really what I'd call a "show stopper", obviously, but I'd be curious if any of you are seeing a similar phenomenon and, if so, if there's a legitimate reason why either KDE or another process needs for /etc/profile to be executed a 2nd time. I can always "work around" this thing by setting some unique flags within my local ".profile" file, but I've never had to do this before.
Anywho, THANKS for any info and/or insight some of you might be willing to toss my way.
Rock on, Linux Penguins !!!
|