Package: drupal6 Version: 6.18-1 Severity: normal Tags: patch The shipped /usr/share/drupal6/scripts/cron.sh requires the "$base_url" variable to be defined strictly starting a line in either the $site/baseurl.php or the $site/settings.php files.
Given they are PHP files, it's not unlikely for an administrator to include whitespace or other characters (i.e. "<? " before this variable. Likewise, it requires (without documenting it) the base URL to be specified within single quotes - Not always the case. I suggest the following patch to allow for such uses, but prevent it from grabbing comments: --- /usr/share/drupal6/scripts/cron.sh 2010-06-06 18:18:56.000000000 -0500 +++ cron.sh 2011-09-27 13:30:11.000000000 -0500 @@ -6,7 +6,14 @@ if [ ! "`basename $site`" = "all" ]; then for file in $site/baseurl.php $site/settings.php; do - [ -f "$file" ] && BASE_URL=`grep '^$base_url' $file | cut -d"'" -f2` + [ -f "$file" ] || break + URL_LINE=`egrep '^[^#]+\$base_url'` + [ "X$URL_LINE" != "X" ] && break + # Try first to get the URL delimited by single quotes + BASE_URL=`echo $URL_LINE | cut -d"'" -f2` + # Failing that, try to get it with double quotes + [ "X$BASE_URL" != "X" ] && BASE_URL=`echo $URL_LINE | cut -d'"' -f2` + # Failing that, ignore this site and jump to the next [ "X$BASE_URL" != "X" ] && break done -- System Information: Debian Release: 6.0.2 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 drupal6 depends on: ii apache2 2.2.16-6+squeeze3 Apache HTTP Server metapackage ii apache2-mpm-prefork [h 2.2.16-6+squeeze3 Apache HTTP Server - traditional n ii curl 7.21.0-2 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 [virt 5.1.49-3 MySQL database client binaries ii php5 5.3.3-7+squeeze3 server-side, HTML-embedded scripti ii php5-gd 5.3.3-7+squeeze3 GD module for php5 ii php5-mysql 5.3.3-7+squeeze3 MySQL module for php5 ii php5-pgsql 5.3.3-7+squeeze3 PostgreSQL module for php5 ii postfix [mail-transpor 2.7.1-1+squeeze1 High-performance mail transport ag ii postgresql-client 8.4.8-0squeeze2 front-end programs for PostgreSQL ii postgresql-client-8.3 8.3.14-0lenny1 front-end programs for PostgreSQL ii postgresql-client-8.4 8.4.8-0squeeze2 front-end programs for PostgreSQL ii wwwconfig-common 0.2.1 Debian web auto configuration Versions of packages drupal6 recommends: ii mysql-server 5.1.49-3 MySQL database server (metapackage ii mysql-server-5.1 [mysql-serve 5.1.49-3 MySQL database server binaries and drupal6 suggests no packages. -- Configuration Files: /etc/drupal/6/sites/default/settings.php changed [not included] -- debconf information excluded -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org