Merged from trunk -r15842:15843
authorFabian Groffen <grobian@gentoo.org>
Tue, 23 Mar 2010 20:22:58 +0000 (20:22 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 23 Mar 2010 20:22:58 +0000 (20:22 -0000)
   | 15843    | install_qa_check: make sure init.d and conf.d files do not  |
   | SpankMan | have syntax errors in them #310805                          |

svn path=/main/branches/prefix/; revision=15844

bin/misc-functions.sh

index 2997ddbcc98f39ccfaa4f44ff2e48348124ee17b..9ce59aac083838f514ec1543ae7e767d227269eb 100644 (file)
@@ -369,6 +369,15 @@ install_qa_check_misc() {
                die "Aborting due to QA concerns: files installed in ${D}/${D}"
        fi
 
+       # Sanity check syntax errors in init.d scripts
+       for d in /etc/conf.d /etc/init.d ; do
+               [[ -d ${ED}/${d} ]] || continue
+               for i in "${ED}"/${d}/* ; do
+                       [[ -L ${i} ]] && continue
+                       bash -n "${i}" || die "The init.d file has syntax errors: ${i}"
+               done
+       done
+
        # this should help to ensure that all (most?) shared libraries are executable
        # and that all libtool scripts / static libraries are not executable
        for i in "${ED}"opt/*/lib{,32,64} \