Package: drupal7
Version: 7.14-1~bpo60+1
Severity: normal
Tags: patch
When running a multisite installation, the provided
/usr/share/drupal7/scripts/cron.sh ignores failure conditions in all
but the last found sites - And for this last site, it just reports an
unhelpful "/USR/SBIN/CRON[8921]: (CRON) error (grandchild #8938 failed
with exit status 22)" message in the logs.
The attached patch fixes this condition, along with #659848 (CRON_KEY
persisting between sites). Yes, it will be more verbose in case of
error, but it will no longer ignore curl's --fail switch.
Thanks,
-- System Information:
Debian Release: 6.0.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-openvz-686 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages drupal7 depends on:
ii apache2 2.2.16-6+squeeze8 Apache HTTP Server metapackage
ii apache2-mpm-prefork 2.2.16-6+squeeze8 Apache HTTP Server - traditional n
ii curl 7.21.0-2.1+squeeze2 Get a file from an HTTP, HTTPS or
ii dbconfig-common 1.8.46+squeeze.0 common framework for packaging dat
ii debconf [debconf-2.0 1.5.36.1 Debian configuration management sy
ii mysql-client-5.1 [vi 5.1.63-0+squeeze1 MySQL database client binaries
ii php5 5.3.3-7+squeeze14 server-side, HTML-embedded scripti
ii php5-gd 5.3.3-7+squeeze14 GD module for php5
ii php5-mysql 5.3.3-7+squeeze14 MySQL module for php5
ii php5-pgsql 5.3.3-7+squeeze14 PostgreSQL module for php5
ii postfix [mail-transp 2.7.1-1+squeeze1 High-performance mail transport ag
ii postgresql-client 8.4.13-0squeeze1 front-end programs for PostgreSQL
ii postgresql-client-8. 8.4.13-0squeeze1 front-end programs for PostgreSQL
ii wwwconfig-common 0.2.1 Debian web auto configuration
Versions of packages drupal7 recommends:
ii mysql-server 5.1.63-0+squeeze1 MySQL database server (metapackage
ii mysql-server-5.1 [mysq 5.1.63-0+squeeze1 MySQL database server binaries and
ii postgresql 8.4.13-0squeeze1 object-relational SQL database (su
drupal7 suggests no packages.
-- debconf information:
drupal7/pgsql/changeconf: false
drupal7/dbconfig-remove:
drupal7/pgsql/authmethod-user:
drupal7/db/basepath:
drupal7/upgrade-error: abort
* drupal7/dbconfig-install: false
drupal7/purge: false
drupal7/upgrade-backup: true
drupal7/pgsql/manualconf:
drupal7/database-type:
drupal7/internal/reconfiguring: false
drupal7/install-error: abort
drupal7/remote/port:
drupal7/remove-error: abort
drupal7/mysql/admin-user: root
drupal7/pgsql/admin-user: postgres
drupal7/missing-db-package-error: abort
drupal7/dbconfig-upgrade: true
drupal7/remote/host:
drupal7/db/app-user: drupal7
drupal7/pgsql/authmethod-admin: ident
drupal7/db/dbname: drupal7
drupal7/pgsql/no-empty-passwords:
drupal7/internal/skip-preseed: true
drupal7/passwords-do-not-match:
drupal7/dbconfig-reinstall: false
drupal7/mysql/method: unix socket
drupal7/pgsql/method: unix socket
drupal7/remote/newhost:
--- cron.sh.orig 2012-10-01 11:13:06.000000000 -0500
+++ cron.sh 2012-10-01 11:05:20.000000000 -0500
@@ -2,6 +2,8 @@
for site in /etc/drupal/7/sites/* ; do
BASE_URL=""
+ CRON_KEY=""
+ FULL_URL=""
if [ ! "`basename $site`" = "all" ]; then
for file in $site/baseurl.php $site/settings.php; do
@@ -19,9 +21,17 @@
fi
if [ "X$CRON_KEY" = "X" ] ; then
- curl --fail --silent --compressed --location
$BASE_URL/cron.php
+ FULL_URL="$BASE_URL/cron.php"
else
- curl --fail --silent --compressed --location
$BASE_URL/cron.php?cron_key=$CRON_KEY
+ FULL_URL="$BASE_URL/cron.php?cron_key=$CRON_KEY"
+ fi
+
+ if curl -S --fail --silent --compressed --location $FULL_URL ;
then
+ # Success!
+ true
+ else
+ echo "Error running the periodic maintenance for $site:
CURL exit code $?"
+ echo "Requested URL: $FULL_URL"
fi
fi
done