/etc/profile executed twice after login
I am working with PHYTEC I.MX31 ARM board iam able to observe /etc/profile executed twice after login to system i just want to know where is that function called from.
|
Quote:
To answer your question, /etc/profile is an initialization file for bash. Each time that a new interactive login bash session is invoked then /etc/profile is sourced. Then once (and only one, the first found, if any) between ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order is run as well. Sometimes people symlink those files to each other, or copy them or do other weird stuff (that they shouldn't be doing), resulting in funny effects like the one you describe. |
/etc/profile executed twice after login
after login u can observe a message displayed "running /etc/profile.local" which is displayed twice and the file /etc/profile.local is called from /etc/profile.
Quote:
|
Then you should revise all the files I told you and see if there's anything strange. First of all check if some of them are symlinks to another file. If you don't know how to proceed, you can start by posting the output of this command.
Code:
ls -l /etc/profile /etc/profile.local ~/.bash_profile, ~/.bash_login, and ~/.profile |
/etc/profile executed twice after login
/etc/profile and /etc/profile.local are just shell scripting files so will it give any result if i give ls -l for these files
Quote:
|
Quote:
If that's not it, then we need to look into ALL of these files, and see what's inside. |
/etc/profile executed twice after login
There are no files inside home directory so the commands are not giving any kind of result.
Quote:
|
It should at least output the lines about /etc/profile and /etc/profile.local, those do exist, don't they? What do these two files contain anyway?
|
BY looking into /etc/profile script i identified that /etc/profile.local is called from /etc/profile.
/etc/profile.local has the following lines export TSLIB_CONFFILE=`/etc/ts.conf` export TSLIB_PLUGINDIR=`/usr/lib/ts` export TSLIB_TSDEVICE=`/dev/event0` Quote:
|
/etc/profile executed twice after login
BY looking into /etc/profile script i identified that /etc/profile.local is called from /etc/profile.
/etc/profile.local has the following lines export TSLIB_CONFFILE=`/etc/ts.conf` export TSLIB_PLUGINDIR=`/usr/lib/ts` export TSLIB_TSDEVICE=`/dev/event0` Quote:
|
Quote:
|
/etc/profile executed twice after login
BUT the message "running /etc/profile.local " is present in the file /etc/profile and i am not able find this in any other file in /etc.
Quote:
|
All times are GMT -5. The time now is 04:59 AM. |