Wow, looks like I have ignited a long thread! :) Maybe I should have better stated that it's not about bash, but that the shells are said to be Bourne-compatible. Also, maybe I exagerated the number of shells, it's about one hundered at most... ;) Te be more precise, I'm packaging Corosync/Pacemaker for XStreamOS. It comes with the older Heartbeat resource agents, mostly shells for different clustering jobs. The specific agent I am testing is "IPaddr", a shell beginning with a shebang at /bin/sh After changing the shell to output its env during run, I found the KSH variable set, and then that it was running /bin/sh -i86/ksh93 The errors I found in the log are about "local" instruction used in included ocf shells to define local variables. This was the answer from a RedHat guy in the Clusterlabs list: "You can either edit the #!/bin/sh line at the top of each RA, or figure out how to point /bin/sh to a Bourne-compatible shell. ksh isn't Bourne-compatible, so I'd expect lots of #!/bin/sh scripts to fail with it as the default shell." So by changing the base IPaddr script with the shebang at /bin/bash , it works. Fact is that mantaining patches for all those shells is tedious, so I may end up with a pre-configure script to sed all of them. Still I don't understand why they're not working, when you state that ksh is Bourne-compatible. Maybe it just not supports the "local" definition? Gabriele ---------------------------------------------------------------------------------------- Sonicle S.r.l. : http://www.sonicle.com Music: http://www.gabrielebulfon.com Quantum Mechanics : http://www.cdbaby.com/cd/gabrielebulfon Da: Erik Trimble A: discuss@lists.illumos.org Data: 27 agosto 2016 11.44.33 CEST Oggetto: Re: [discuss] default system shell Well, Since a significant amount of Linux distros use Dash instead of Bash for /bin/sh, and the large majority of Solaris/IllumOS system scripts depend on a 100% Bourne-compatible /bin/sh (of which Bash is *not*), I'd say fix the shell script, rather than open that particular can of worms. Frankly, this is lazy coding on the part of the App Developer, since /bin/sh on ANY Unix-ish system other than Linux has NEVER been Bash. Bash was used in Linux for quite awhile due to (a) Lazy Distro maintainers, and (b) lack of a real, suitable, pure unencumbered Bourne Shell. That was fixed almost a decade ago, though, so continued reliance that /bin/sh -bash is just very sloppy coding. Also, just to be clear: the scripts seem to wanting Bash, which is NOT a 100% compatible Bourne shell (of which ksh *is*). -Erik On Sat, Aug 27, 2016 at 1:37 AM, Gabriele Bulfon gbul...@sonicle.com wrote: Hi, recently I've been driving mad porting a linux software containing a lot of shells, failing with poor debugging infos. At the end, I found they were all using /bin/sh but required a compatible Bourne shell. This will require me to patch hundreds of shell to point to /bin/bash instead of /bin/sh So my question is : do we really need /bin/sh to point to ksh in 2016? What do I risk by changing its link to /bin/bash? Gabriele ------------------------------ ------------------------------ ---------------------------- Sonicle S.r.l. : http://www.sonicle.com Music: http://www.gabrielebulfon.com Quantum Mechanics : http://www.cdbaby.com/cd/ gabrielebulfon illumos-discuss | Archives | Modify Your Subscription
------------------------------------------- illumos-discuss Archives: https://www.listbox.com/member/archive/182180/=now RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be Modify Your Subscription: https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4 Powered by Listbox: http://www.listbox.com