* QA Notice: shell script appears to use non-POSIX feature(s): * possible bashism in /etc/init.d/apache2 line 154 (type): * if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then * possible bashism in /etc/init.d/apache2 line 171 (type): * if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then
--- /etc/init.d/apache2.virgin 2017-10-25 14:24:51.440581907 +0200 +++ /etc/init.d/apache2 2017-10-25 12:03:37.205711587 +0200 @@ -151,7 +151,7 @@ } fullstatus() { - if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then + if ! command -v $(set -- ${LYNX}; echo $1) 2>/dev/null; then eerror "lynx not found! you need to emerge www-client/lynx" else ${LYNX} ${STATUSURL} @@ -168,7 +168,7 @@ checkconfd || return 1 - if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then + if ! command -v $(set -- ${LYNX}; echo $1) 2>/dev/null; then eerror "lynx not found! you need to emerge www-client/lynx" else echo "${APACHE2} started with '${APACHE2_OPTS}'"
Hm... This prints the lynx command, must somehow mute it.
This seems to work nicer, tested with bash and dash: --- /etc/init.d/apache2.virgin 2017-10-25 14:24:51.440581907 +0200 +++ /etc/init.d/apache2 2017-10-25 14:32:10.350036438 +0200 @@ -151,7 +151,7 @@ } fullstatus() { - if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then + if ! command -v $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then eerror "lynx not found! you need to emerge www-client/lynx" else ${LYNX} ${STATUSURL} @@ -168,7 +168,7 @@ checkconfd || return 1 - if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then + if ! command -v $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then eerror "lynx not found! you need to emerge www-client/lynx" else echo "${APACHE2} started with '${APACHE2_OPTS}'"
A friendly bump :)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/apache.git/commit/?id=65a60b84f492efeb391e853724c12c0b78b2aa25 commit 65a60b84f492efeb391e853724c12c0b78b2aa25 Author: Tomáš Mózes <hydrapolic@gmail.com> AuthorDate: 2018-04-19 20:49:27 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2018-04-19 20:49:27 +0000 init scripts: Replaced non-POSIX compliant "type -p" calls. Closes: https://bugs.gentoo.org/635400 2.2/init/apache2.initd | 4 ++-- 2.4/init/apache2.initd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
(In reply to Tomáš Mózes from comment #4) > A friendly bump :) Sorry for the inadequately long delay. I will fix this with the next apache bump.
No problem, thank you very much :)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a898b593a3ab8ebeecdf872089ca1bb158668f0 commit 2a898b593a3ab8ebeecdf872089ca1bb158668f0 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2018-05-29 08:34:52 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2018-05-29 08:35:38 +0000 www-servers/apache: Revbump to fix bashisms in init script. Also added mod_md module. Closes: https://bugs.gentoo.org/651570 Closes: https://bugs.gentoo.org/635400 Package-Manager: Portage-2.3.40, Repoman-2.3.9 www-servers/apache/Manifest | 2 +- .../{apache-2.4.33.ebuild => apache-2.4.33-r1.ebuild} | 14 +++++++++----- www-servers/apache/metadata.xml | 1 + 3 files changed, 11 insertions(+), 6 deletions(-)