3 . `dirname $0`/../config.sh
5 # Test whether all required packages are installed and generate a mail
6 # if they aren't, so that the admin is informed.
8 locales="de_DE.UTF-8 en_US.UTF-8 nl_NL fr_FR.UTF-8 uk_UA.UTF-8"
13 trap "rm -f $packages $locs" INT EXIT
16 dpkg-checkbuilddeps >> $packages 2>&1
20 if ! grep -q "^$l" /etc/locale.gen
22 echo "Locale $l missing." >> $locs
29 if [ ! -d "$cachedir" ]
31 echo "cachedir missing." >> $cache
33 perm=$(ls -ld "$cachedir" | perl -ne 'print "ok" if /^drwxrws--- \d+ www-data/')
36 echo "cachedir has wrong permissions." >> $cache
37 echo "make sure it is writable by the web server." >> $cache
42 if [ -s $packages -o -s $locs -o -s $cache ]
45 echo "Subject: Problem packages.debian.org on `hostname -s`"
46 echo "To: ${admin_email}"
48 echo "On host `hostname -f`"
52 echo "Missing packages:"
58 echo "Missing locales:"
64 echo "Problems with cachedir:"
68 ) | tee /dev/stderr | /usr/sbin/sendmail -t