Mail Archives: cygwin/2003/08/15/12:22:09
1. I downloaded the new version of base-files (2.0-2) today. I note that the
new config files now go into the /etc/defaults directory, which is a good
idea! Although it does have one disadvantage - if there are problems in
the new files, many existing users won't see them.
Unfortunately, I did notice problems with /etc/profile:
Firstly, it sets
stty erase ^?
In my view the correct setting is definitely ^h (backspace). Setting the
erase character to ^? (delete) causes problems when 'normal' terminal
i/o is used. The delete key doesn't seem to work in a Windows command
window, and a resource (deleteIsDel) has to be set to make it work in an
xterm window.
Secondly, the section which checks whether the user's passwd entry has
been set up uses nonstandard operators (==) which aren't supported by
all sh-like shells. This is what happens when profile is sourced by /bin/sh:
[: ==: unknown operand
I changed == to =, and now all is well.
2. SHELL environment variable problem.
For some reason, the bash shell tends to drop the SHELL variable from the
environment, causing a variety of problems. I fixed this with a new
startup script (/etc/bash.bash_env) which issues 'export SHELL', and by
contriving (via the BASH_ENV environment variable and .bashrc scripts) that
all bash shells will use the script.
3. /bin/sh sources /etc/profile when called from ftp.exe
If SHELL isn't exported or is set to /bin/sh, ftp.exe uses the /bin/sh
shell for shell escapes. Unfortunately the working directory of the shell
is then always set to the user's home directory. Now I know why - for some
reason, /bin/sh thinks it's a login shell and sources the profile. This
bug seems to be specific to ftp - I haven't seen it with sftp.
--
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/
- Raw text -