CDV ❯ shell scripts do not function correctly on ubuntu
-
Bug
-
Status: Reopened
-
2 Major
-
Resolution:
-
-
-
drb
-
Reporter: tgautier
-
October 02, 2008
-
0
-
Watchers: 0
-
April 23, 2021
-
Description
Ubuntu’s default shell is dash which does not conform to standard sh syntax.
This is really a problem with Ubuntu - it should not symlink /bin/sh to /bin/dash in light of such incompatibilities. Nonetheless, this problem affects our users from time to time and is rather obscure.
Most recently a forum user here ran into this: http://forums.terracotta.org/forums/posts/list/1437.page
Current workaround: 1) Point /bin/sh to /bin/bash
- or - 2) update the script to be /bin/bash instead of /bin/sh
Comments
Hung Huynh 2008-10-02
Chris Dennis 2008-10-02
Just to point out that this will get more significant in the future - http://release.debian.org/lenny/goals.txt - Debian are moving to dash as their standard sh, and are purging what they are calling “bashisms” from their shell scripts.
Fiona OShea 2008-10-03
Someday we can see if we can provide a more cross script solutions. For now it is documented under known issues.
Taylor Gautier 2008-10-03
I don’t favor (2) - one major issue is compatiblity and ease of use on platforms like Solaris and HPUX (the former is a Terracotta supported platform, the latter is not yet suppored, but likely in the next year).
If there are any “bashims” in our sh scripts, then that is wrong - but I believe we are compatible with sh. The real problem is as I understand it dash being incompatible with sh which seems to me to just be wrong.
Chris Dennis 2021-04-23
https://www.youtube.com/watch?v=1yjxWfyxpqY
I favor (2). Bash script is more robust and works well on all of our supported platforms. SH shell has a lot of bugs.