[Pkg-dspam-misc] Bug#461137: debian/libdspam7-drv-mysql.cron.daily: use "cut -c1" instead of bashism.

Michele Angrisano darksun1988 at gmail.com
Wed Jan 16 20:51:30 UTC 2008


Package: dspam
Version: 3.6.8-5.1
Severity: wishlist
Tags: patch
User: Michele Angrisano <micheleangrisano at ubuntu.com>
Usertags: origin-ubuntu hardy ubuntu-patch



*** /tmp/tmpDcAWNG
In Ubuntu, we've applied the attached patch to achieve the following:

    - debian/libdspam7-drv-mysql.cron.daily: use "cut -c1" instead of bashism.

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: lenny/sid
  APT prefers hardy-updates
  APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-14-generic (SMP w/1 CPU core)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
diff -u dspam-3.6.8/debian/libdspam7-drv-mysql.cron.daily dspam-3.6.8/debian/libdspam7-drv-mysql.cron.daily
--- dspam-3.6.8/debian/libdspam7-drv-mysql.cron.daily
+++ dspam-3.6.8/debian/libdspam7-drv-mysql.cron.daily
@@ -21,7 +21,7 @@
     umask "$UMASK_OLD"
 
     # If host is empty or starting with a / assume it's localhost.
-    if [ -z "$MYSQL_HOST" ] || [ "${MYSQL_HOST:0:1}" = "/" ]; then
+    if [ -z "$MYSQL_HOST" ] || [ ` echo "${MYSQL_HOST}" | cut -c1 ` = "/" ]; then
         /usr/bin/mysql --defaults-extra-file=$MYSQLCONF_PASSWD --user=$MYSQL_USER $MYSQL_DB < $PURGE
     else
         if echo "$MYSQL_HOST" | grep "^/" > /dev/null 2>&1 ; then


More information about the Pkg-dspam-misc mailing list