X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=blobdiff_plain;f=cron.d%2F050checkinst;h=7f054cb8ca152da1876b655588102213d72e6b0f;hp=ad6397a20526e8d32047dc4724c182f036fa558d;hb=2ec757bb58907b15c43548be5601d4f2b8c7caac;hpb=61f260a9f3e0448011801416af88d04f61d778b1 diff --git a/cron.d/050checkinst b/cron.d/050checkinst index ad6397a..7f054cb 100755 --- a/cron.d/050checkinst +++ b/cron.d/050checkinst @@ -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