Hi,When running the bacula regression tests on Ubuntu 10.04 with a postgresql database the tests fail because the database is not setup correctly by create_postgresql_database. Having investigated the problem it seems that the double quotes around the version numbers in the version test case statement are being interpreted literally and not as wildcards.
I am running postgresql 8.4 but "8.[456789]" is not matching it. If I remove the double quotes then it all works fine.
My first thought was that this was due to /bin/sh being set to dash but I have tested this with both bash, ksh too with the same results.
The attached patch fixes the issue for me and all regression tests pass once this is applied.
Regards Richard
>From 18c48ae88ede236ff829b558ae91e54b1c3815e4 Mon Sep 17 00:00:00 2001 From: Richard Mortimer <[email protected]> Date: Tue, 14 Sep 2010 23:04:36 +0100 Subject: [PATCH] Do not quote shell case patterns. They lose their special meaning when quoted and only match exactly. --- bacula/src/cats/create_postgresql_database.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bacula/src/cats/create_postgresql_database.in b/bacula/src/cats/create_postgresql_database.in index 50fe6c4..e5d8644 100644 --- a/bacula/src/cats/create_postgresql_database.in +++ b/bacula/src/cats/create_postgresql_database.in @@ -18,10 +18,10 @@ PSQLVERSION=`psql -d template1 -c 'select version()' | awk '/PostgreSQL/ {print # This must be updated for future versions of PostgreSQL # case ${PSQLVERSION} in - "9.*") + 9.*) ENCODING="ENCODING 'SQL_ASCII' LC_COLLATE 'C' LC_CTYPE 'C'" ;; - "8.[456789]") + 8.[456789]) ENCODING="ENCODING 'SQL_ASCII' LC_COLLATE 'C' LC_CTYPE 'C'" ;; *) -- 1.7.0.4
------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
