Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird bash 4.2.28 configuration?
2012-06-06, 04:46 PM
Post: #1
Weird bash 4.2.28 configuration?
On a new install of Interix, with the pkg-complete for x64 (genuineintel), bash is... not configured as I would expect, by default. running "pkg_update -rL bash" didn't help. In particular:

It is missing the Interix PATH entries (/bin, /usr/local/bin, /opt...)

It is missing the MANPATH, TERM, and TERMCAP variables entirely (and probably others).

It is defaulting to a working directory of /dev/fs/C/Windows/System32 (location of posix.exe, probably).

Additionally, the built-in LS is acting weirdly; the command "ls /" produces the listing for /dev/fs/C/, not for / (though you can get the listing for / by asking for "ls /../../.."). /bin/ls works more-or-less as expected, but isn't used by default (see weirdness of PATH).

Launching bash from within tcsh works fine, since the inherited environment is already set up. However, launching bash from the Run dialog, the system tray, or a cmd terminal produces the unconfigured version (although it inherits the CWD from cmd).

Launching bash from the Start menu (All Programs->Subsystem for Unix...->Bash Shell) doesn't work at all, because the shortcut specifies a working directory ("Start in" field) of "C:\WINNT40\system32\" which my NT 6.1 box utterly lacks...

System: Windows 7 SP1, Enterprise edition, x64. UAC is enabled but setuid behavior and su-to-root are both allowed, and the installation was done as Administrator.
Find all posts by this user
Quote this message in a reply
2012-06-06, 07:11 PM
Post: #2
RE: Weird bash 4.2.28 configuration?
I'll start looking into it. Thanks for the info.
Find all posts by this user
Quote this message in a reply
2012-06-06, 07:55 PM
Post: #3
RE: Weird bash 4.2.28 configuration?
Thanks, Rodney. Looks like a total of 84 environment variables in bash-invoked-from-tcsh, and only 62 in bash-invoked-from-taskbar.

It appears to not be reading the profile files in /etc, probably because of the path screwup exhibited by the builtin ls. It happens in other builtins, too. For example,
Code:
$ cat /etc/profile
cat: /dev/fs/C/etc/profile: No such file or directory
Oddly enough, path autocompletion seems to work correctly. I don't know enough of the internals of bash to say why that might be.
Code:
$ /bin/cat /etc/profile
works just fine, though.
Find all posts by this user
Quote this message in a reply
2012-06-07, 01:03 AM
Post: #4
RE: Weird bash 4.2.28 configuration?
Thanks for that additional info.

It smells like the "I know better than the libraries that ship with the system" libraries that are part it.
That's what caused (different) problems the previous release. I'd tested for those ones and they were clear.
Find all posts by this user
Quote this message in a reply
2012-06-07, 11:47 AM
Post: #5
RE: Weird bash 4.2.28 configuration?
It's weird for sure... it seems the login option is not being obeyed (the '-l' or '--login').
This is on 64-bit. On 32-bit it is obeyed. Weird because it's the same code & configuration.
It's looking less clear to find what the root of the problem is, so no time estimate (alas).
Find all posts by this user
Quote this message in a reply
2012-06-07, 12:44 PM
Post: #6
RE: Weird bash 4.2.28 configuration?
There seem to be regressions in the bash code from earlier versions (even with this at patch 42 already).
It's not interpreting command substitutions using "$()" correctly.
There's a work-around that I have (using back-ticks instead), but I'll see what else I can come up with.
This is appearing on 32 and 64 bit versions, but kicking an error at slightly different times.
Just FYI.
Find all posts by this user
Quote this message in a reply
2012-06-23, 04:20 PM (This post was last modified: 2012-06-23 10:12 PM by brc0703.)
Post: #7
RE: Weird bash 4.2.28 configuration?
yeah im getting the error with $() and was doing the same thing with `` and not getting a login displaying your current directory.. how can i downgrade back to 3.2.39.2 ?

EDIT: ok never mind i installed 3.1 with apt-get and it fixed it.. still would like to know how to downgrade for in the future
Find all posts by this user
Quote this message in a reply
2012-06-25, 01:53 PM
Post: #8
RE: Weird bash 4.2.28 configuration?
Well, you can always manually download the package from the suacommunity FTP server and install it used pkg_add. There's probably a better way, but I actually don't know it.
Find all posts by this user
Quote this message in a reply
2012-06-25, 02:11 PM
Post: #9
RE: Weird bash 4.2.28 configuration?
i tried that and when clicking the link it errors "550 /src/bash: No such file or directory"
Find all posts by this user
Quote this message in a reply
2012-10-08, 03:05 AM
Post: #10
RE: Weird bash 4.2.28 configuration?
There seem to be regressions in the bash code from earlier versions (even with this at patch 42 already).
It's not interpreting command substitutions using "$()" correctly.

Test king http://www.testking.us
Exam material 1z0-05 http://www.testking.us/1z0-051.htm
Exams 642-618 http://www.testking.us/642-618.htm
Material 642-637 http://www.testking.us/642-637.htm
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)