OpenRC is shell-agnostic, and so it should not be assumed that the shell executing init-scripts is bash - only POSIX constructions should be there. Reproducible: Always
Created attachment 249962 [details, diff] Patch to remove bashisms from the init-scripts
POSIX compliance is not a requirement. it's up to the maintainer to include it. please do not cc people yourself. let the wranglers take care of it.
(In reply to comment #2) > POSIX compliance is not a requirement. it's up to the maintainer to include > it. I think it's a perfectly valid bug if OpenRC tries to run bash scripts with /bin/sh ("the POSIX shell"). If the init-scripts are assumed to be written in bash, then it should run them with bash. And if the scripts are supposed to POSIX-compliant, then they shouldn't contain bash-specific features. So either way, it's either a bug in the init-scripts or in OpenRC. Am I wrong in my thinking?
*** Bug 484694 has been marked as a duplicate of this bug. ***
(In reply to SpanKY from comment #2) > POSIX compliance is not a requirement. it's up to the maintainer to include > it. Why isn't it a requirement? If I understood correctly the goal of the gentoo project is maximum customization. The fact that many shell scripts (ebuilds, init scripts, etc) rely on non-POSIX-shell functionality actually reduces choices. For instance, I would not like to use bash as /bin/sh but currently I can't replace bash because many init scripts (e.g hostname or courier-imap) rely on a bunch of bashisms (which sucks a lot). Another thing I would like to do is replace coreutils with busybox (see bug 60805) but you can't do that either since many shell scripts used by gentoo also rely on gnuisms (which sucks as well). So in my opinion POSIX compliance should be a requirement, why isn't it?
*** Bug 270662 has been marked as a duplicate of this bug. ***
Alec, thanks, patch is applied in the tree.
That was fast, thanks! :P