"source" is a bash builtin. This fails if /bin/sh is another shell. This is a critical error, but the script continues to run. "shift" fails if there are no arguments. bash continues to run, but dash exits. Reproducible: Always Steps to Reproduce: USE="fpm" emerge php eselect-php emerge app-shells/dash eselect-sh eselect sh set dash /usr/libexec/php-fpm-launcher Actual Results: /usr/libexec/php-fpm-launcher: 3: /usr/libexec/php-fpm-launcher: source: not found /usr/libexec/php-fpm-launcher: 7: shift: can't shift that many
Created attachment 487138 [details] working script Linted with shellcheck 0.4.6, tested with app-shells/dash-0.5.9.1-r1.
Thanks, as a dash user, I probably should have caught that. Also, TIL about eselect-sh. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79f7e50ba7490e41619feb1bed61f47c8552c8fa commit 79f7e50ba7490e41619feb1bed61f47c8552c8fa Author: Michael Orlitzky <mjo@gentoo.org> Date: Sat Jul 29 08:25:37 2017 -0400 app-eselect/eselect-php: new revision to fix bashisms. Thomas Arnett pointed out two bashisms in our php-fpm launcher, and provided a new script that works with app-shells/dash. This commit updates the launcher, and revisions the v0.9.4 ebuild to use it. I fixed the live ebuild while I was at it. Gentoo-Bug: 626496