bug in /etc/profile?

Steven Boothe steven@poiema.org
Sat Mar 19 23:55:00 GMT 2005


Hello all:

I'm not sure if this is a bug or not, but I have managed to determine that 
/etc/profile generates a rather curious environment variable:

typing set from a command prompt:

noone@sector0 ~
$ set
...
USERPROFILE='C:\Documents and Settings\noone'
VERSION=3.0.1
WINDIR='C:\WINDOWS'
_=/home/noone/.bashrc
f=

noone@sector0 ~
$

I was able to narrow down the cause to this code here in /etc/profile:
<code>
# Run all of the profile.d scripts
# Note that these are supplied by separate packages
# Ascending alphanumerical order enforced
if [ -d "/etc/profile.d" ]; then
	while read f; do
		if [ -f "${f}" ]; then
			. "${f}"
		fi
	done <<- EOF
	`/bin/find /etc/profile.d -iname '*.sh' -type f | sort`
	EOF
fi
</code>

Now just so all my steps are known, to test this I emptied the /etc/profile.d 
directory and started cygwin and the environment variable was still there on 
start. However if I commented out this section it would go away.

Now as far as I can tell from the code in /etc/profile I couldn't see any 
glaring syntax errors so I'm not sure this is a bug or a feature? :) Maybe I 
should just enter what I've written here in the bug database and let it 
become checked and closed if that is indeed just a feature or something.

I am still trying to track down what is causing the other variable:
_=/home/noone/.bashrc

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list