[arch-general] dash as system /bin/sh? (Was: dash as default shell?)

Eli Schwartz 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 [1] 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?
> [1] 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.

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20200618/36672f6b/attachment.sig>

More information about the arch-general mailing list