Hacker News new | ask | show | jobs
by eridius 4279 days ago
Kind of hard to remove Bash when it's the default shell and a great many scripts have been written targeting Bash features. Sure, there are other sh-compatible shells, but AFAIK they aren't 100% compatible with Bash.

Edit: If you disagree with me, please reply instead of downvoting.

3 comments

Let's hope they aren't 100% compatible!
Heh, true. I almost wrote "bug-for-bug compatible", but realized how foolish that would be.
If Debian/Ubuntu replaced Bash for Dash as standard shell I don't know any reason why MacOsX can't do the same.
How long ago did that happen? I know it uses Dash now but I'm not familiar with the shell history of Ubuntu.

Regardless, the difference is people who run Linux upgrade major versions intentionally (I assume the switch happened on a major version upgrade) and expect software packages to have to support their OS version. For example, the package manager keeps separate packages for each distribution.

OS X works differently. It's a customer OS, which people upgrade without reinstalling anything, and they expect their software to continue working. Furthermore, OS X software never targets specific OS versions, instead only targeting a minimum version, and software that works on one version of OS X is expected to work on the next version (any changes that break apps go through a deprecation process first, so the software has to be unmaintained for at least a major OS version before it will break).

Because of that, any software that relies on bash-specific functionality would break if bash were replaced, and it would generally be considered unacceptable.

What can be done is /bin/sh could be changed to another sh-compatible shell, but Bash would still have to be shipped on the system.

Ubuntu made the change for Ubuntu 6.10 (edgy), released in October 2006 (for those unfamiliar with the version scheme).

A slight correction to the poster before you: /bin/sh was linked to dash (making quite a few shellshock exploits fail on Ubuntu), while /bin/bash was the default user account shell... much as you've suggested!

On Yosemite:

  $ /bin/sh --version
  GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin14)
  Copyright (C) 2007 Free Software Foundation, Inc.
So yes, anything that naively creates subprocesses using /bin/sh -c is open to shellshock exploits on (unpatched) OS X. :-)
> How long ago did that happen?

Debian shipped dash as default shell in Squeeze, which was in testing from 2010-08-06 and stable from 2011-02-06.

Resist complaining about being downmodded. It never does any good, and it makes boring reading. From http://news.ycombinator.com/newsguidelines.html
Actually, saying "please reply instead of downvoting" does seem to help. Of course, my goal isn't meaningless karma, it's to find out why people think my comment is worth downvoting. The few times I've edited a comment to say "please reply instead of downvoting", the downvotes stopped, and people start replying instead.
In my experience, the corrective upvotes happen without calling out that the downvotes are happening.
Sometimes, yes. But my actual goal is to encourage dissenters to reply, because I actually want to know why they disagree with me. The karma itself is entirely meaningless except in that it affects how many people end up reading the comment.
Who says they disagree? Your post was just spam, saying all the obvious things everybody already knew.
I would love to see a statistical analysis of this. :)
The guidelines were written in order to make HN a better place for the entire HN community. Your defense of "please reply instead of downvoting" only touches upon how it "seems to help" you.
Encouraging discussion helps everyone. That's what the comments are for. The guidelines have that line in them because people do not like reading complaints about being downvoted, and because those complaints are not productive conversation. Not because there is some underlying reason why drawing attention to the existence of comment moderation is somehow wrong.