ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
331 stars 89 forks source link

change /bin/sh to /bin/bash #93

Closed ryzom-pipeline closed 10 years ago

ryzom-pipeline commented 10 years ago

Original report by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


Maybe I'm missing something obvious, but why keep /bin/sh in the scripts when they don't work without bash as a shell?

ryzom-pipeline commented 10 years ago

Original comment by Matthew Lagoe (Bitbucket: botanic, GitHub: botanic).


I tried once to change it all to bin/bash but it didnt work...

Have you tested this?

Also why are there changes in /code/ryzom/server/shard.screen.rc

ryzom-pipeline commented 10 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Problem is a common shell is "dash" that is meant to be a "bash" clone with compatible commands (even if not 100%). I'm not sure /bin/bash is present when /bin/dash is installed :(

ryzom-pipeline commented 10 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


I have ubuntu precise with dash as /bin/sh and shard is running with this patch

shard.screen.rc is using '/bin/sh service_launcher.sh' to launch the services. Even if you would change shell in script header, it would still be running under /bin/sh (dash). There is other places where shell is used like that.

ryzom-pipeline commented 10 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


Kervala: bash is kind of required to run the server so it does get installed if not already :-) I believe bash is in base ubuntu packages anyway.

Shard scripts can be made to work with dash (ie remove bashism), but dash built in function 'read' does not support timeout value that service_launcher.sh uses.

ryzom-pipeline commented 10 years ago

Original comment by Matthew Lagoe (Bitbucket: botanic, GitHub: botanic).


I would say the best solution would be to make it bash/dash compatible scripts so it works on ubuntu or other distros easly.

ryzom-pipeline commented 10 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


I created issue #99 for dash scripts

ryzom-pipeline commented 10 years ago

Original comment by Matthew Lagoe (Bitbucket: botanic, GitHub: botanic).


merged pull request