[Pkg-dspam-misc] Bug#388140: libdspam7-drv-mysql: cleanup cron
job doesn't work if database server is remote
Jesus Climent
jesus.climent at hispalinux.es
Sun Sep 24 19:41:40 UTC 2006
On Mon, Sep 18, 2006 at 03:58:35PM -0400, root wrote:
> Package: libdspam7-drv-mysql
>
> mysqld is on a remote host.
>
> Here is a naive patch that works:
>
> --- libdspam7-drv-mysql.orig 2006-09-18 15:57:54.351747240 -0400
> +++ libdspam7-drv-mysql 2006-09-18 15:54:05.493538976 -0400
> @@ -11,7 +11,12 @@
> MYSQL_USER="`grep "^MySQLUser" $MYSQLCONF | awk '{print $2}'`"
> MYSQL_PASS="`grep "^MySQLPass" $MYSQLCONF | awk '{print $2}'`"
> MYSQL_DB="`grep "^MySQLDb" $MYSQLCONF | awk '{print $2}'`"
> - /usr/bin/mysql --user=$MYSQL_USER --password=$MYSQL_PASS $MYSQL_DB < $PURGE
> + MYSQL_HOST="`grep "^MySQLServer" $MYSQLCONF | awk '{print $2}'`"
> + if [ -z "$MYSQL_HOST" ] ; then
> + /usr/bin/mysql --user=$MYSQL_USER --password=$MYSQL_PASS $MYSQL_DB < $PURGE
> + else
> + /usr/bin/mysql --host $MYSQL_HOST --user=$MYSQL_USER --password=$MYSQL_PASS $MYSQL_DB < $PURGE
> + fi
> fi
> fi
+1 for this patch.. Anyone against?
--
Jesus Climent info:www.pumuki.org dj:triplestereo.com
Unix SysAdm|Linux User #66350|Debian Developer|2.6.17|Helsinki Finland
GPG: 1024D/86946D69 BB64 2339 1CAA 7064 E429 7E18 66FC 1D7F 8694 6D69
Actually, my name is Austin Powers. Danger is my middle name.
--Austin Powers (Austin Powers: International Man of Mystery)
More information about the Pkg-dspam-misc
mailing list