install_qa_check_prefix: auto fix shebang of init-scripts
authorFabian Groffen <grobian@gentoo.org>
Wed, 12 Sep 2012 18:24:24 +0000 (20:24 +0200)
committerFabian Groffen <grobian@gentoo.org>
Wed, 12 Sep 2012 18:24:24 +0000 (20:24 +0200)
Always consider scripts in ${EPREFIX}/etc/init.d as must-fixable.

bin/misc-functions.sh

index d46ab060b7dc5ead69a23ecd6c31d7d984dfb70a..8c6a12683a8ac2f4d8c25c8d9e1f44fe5d596771 100644 (file)
@@ -949,8 +949,9 @@ install_qa_check_prefix() {
                        fi
                        continue
                fi
-               # unprefixed shebang, is the script directly in $PATH?
-               if [[ ":${PATH}:" == *":${fp}:"* ]] ; then
+               # unprefixed shebang, is the script directly in $PATH or an init
+               # script?
+               if [[ ":${PATH}:${EPREFIX}/etc/init.d:" == *":${fp}:"* ]] ; then
                        if [[ -e ${EROOT}${line[0]} || -e ${ED}${line[0]} ]] ; then
                                # is it unprefixed, but we can just fix it because a
                                # prefixed variant exists