summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-11 16:09:25 -0800
committerZac Medico <zmedico@gentoo.org>2013-01-11 16:09:25 -0800
commit59b5352c457d0f5449d6ff9fb06646fe473cc594 (patch)
tree9e63714a13800d669f28b41d8cfd91e62ec80458
parent0fc94e206280dc5aac9a486cccc0968a279939a8 (diff)
downloadportage-59b5352c457d0f5449d6ff9fb06646fe473cc594.tar.gz
portage-59b5352c457d0f5449d6ff9fb06646fe473cc594.tar.bz2
portage-59b5352c457d0f5449d6ff9fb06646fe473cc594.zip
Tweak init.d qa check for bug #451386.
-rwxr-xr-xbin/misc-functions.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 6f8452601..5fd0eab2c 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -554,6 +554,10 @@ install_qa_check() {
[[ -L ${i} ]] && continue
# if empty conf.d/init.d dir exists (baselayout), then i will be "/etc/conf.d/*" and not exist
[[ ! -e ${i} ]] && continue
+ if [[ ${d} == /etc/init.d && ${i} != *.sh ]] ; then
+ # skip non-shell-script for bug #451386
+ [[ $(head -n1 "${i}") =~ ^#!.*[[:space:]/](runscript|sh)$ ]] || continue
+ fi
bash -n "${i}" || die "The init.d file has syntax errors: ${i}"
done
done