]> git.deb.at Git - deb/packages.git/blobdiff - cron.d/050checkinst
The Big, the Fat and the Ugly commit ;)
[deb/packages.git] / cron.d / 050checkinst
index ad6397a20526e8d32047dc4724c182f036fa558d..7f054cb8ca152da1876b655588102213d72e6b0f 100755 (executable)
@@ -16,6 +16,7 @@ locales="de_DE.UTF-8 en_US.UTF-8 nl_NL fr_FR.UTF-8"
 
 packages=`tempfile`
 locs=`tempfile`
+cache=`tempfile`
 trap "rm -f $packages $locs" INT EXIT
 
 for p in $required
@@ -36,7 +37,22 @@ do
     fi
 done
 
-if [ -s $packages -o -s $locs ]
+if [ -n "$cachedir" ]
+then
+    if [ ! -d "$cachedir" ]
+    then
+       echo "cachedir missing." >> $cache
+    else
+       perm=$(ls -ld "$cachedir" | perl -ne 'print "ok" if /^drwxrws--- \d+ www-data/')
+        if [ -z "$perm" ]
+       then
+           echo "cachedir has wrong permissions." >> $cache
+           echo "make sure it is writable by the web server." >> $cache
+       fi
+    fi
+fi
+
+if [ -s $packages -o -s $locs -o -s $cache ]
 then
     (
        echo "Subject: Problem packages.debian.org on `hostname -s`"
@@ -56,6 +72,12 @@ then
            echo
            cat $locs
        fi
+       if [ -s $cache ]
+       then
+           echo "Problems with cachedir:"
+           echo
+           cat $cache
+       fi
     ) | /usr/sbin/sendmail -t
 fi