[arch-general] dash as system /bin/sh? (Was: dash as default shell?)
eschwartz at archlinux.org
Thu Jun 18 23:26:17 UTC 2020
On 6/18/20 7:15 PM, Chris Billington via arch-general wrote:
> I haven't seen this mentioned yet which makes me wonder if I've
> misunderstood, but isn't it already the case that bash runs in a
> posix-compatible mode if executed as /bin/sh?
> I remember a bug a while back  that broke graphical login because
> flatpak used a bashism in an X startup script. Does this not imply that any
> bashisms executed with /bin/sh would already be causing breakage today on
> Arch Linux?
>  https://bugs.archlinux.org/task/61420#comment176360
Yep -- as I said earlier in the thread:
> Meanwhile, scripts which use bashisms but a /bin/sh shebang are broken
> even if /bin/sh is a symlink to bash. Bash disables some, but not all,
> features of bash if it is invoked in POSIX mode, such as via a symlink
> named /bin/sh -- so, you do not even get the benefits of bash, and never
> have, if you used /bin/sh as your shebang.
Bug Wrangler and Trusted User
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1601 bytes
Desc: OpenPGP digital signature
More information about the arch-general