]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Test postgresql encoding at the start of the test
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 12 Apr 2009 11:53:04 +0000 (11:53 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 12 Apr 2009 11:53:04 +0000 (11:53 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8716 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/functions

index 715f6fb4cb0dd5deed3d08ac8d8543bb77325457..d4105a8fe6c01c8ca6b8de61b2a1715e3c9fe9d8 100644 (file)
@@ -3,8 +3,18 @@
 #
 
 
+check_encoding()
+{
+   $bin/bacula-dir -d50 -t -c bin/bacula-dir.conf 2>&1 | grep 'Wanted SQL_ASCII, got UTF8' >/dev/null
+   if [ $? = 0 ]; then
+       echo "Found database encoding problem, please modify the database encoding (SQL_ASCII)"
+       exit 1
+   fi
+}
+
 start_test()
 {
+   check_encoding
    # Turn off email
    outf="tmp/sed_tmp"
    echo "s%  mail =%# mail = %g" >${outf}