]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/drop_bacula_tables.in
Fix #1624 about segfault in dvd driver when calling rewind(NULL)
[bacula/bacula] / bacula / src / cats / drop_bacula_tables.in
index 0ecc3f386491dcf25204f74dafe5ddfed21bb4ed..459d504661f2ad3ebb3e9c60182ede863fccf7ae 100755 (executable)
@@ -1,18 +1,23 @@
 #!/bin/sh
 #
 #  Drop Bacula tables -- works for whatever is configured,
-#    MySQL or SQLite
+#    MySQL, SQLite, Ingres, or PostgreSQL
 #
-if test xsqlite = x@DB_NAME@ ; then
-  . ./drop_sqlite_tables
+if test xsqlite3 = x@DB_TYPE@ ; then
+  @scriptdir@/drop_@DB_TYPE@_tables $*
   echo "Dropped SQLite tables"
 else
-  if test xmysql = x@DB_NAME@ ; then 
+  if test xmysql = x@DB_TYPE@ ; then 
     echo "Making MySQL tables"
-    . ./drop_mysql_tables
+    @scriptdir@/drop_mysql_tables $*
     echo "Dropped MySQL tables"
+  elif test xingres = x@DB_TYPE@ ; then
+    echo "Dropping Ingres tables"
+    @scriptdir@/drop_ingres_tables $*
+    echo "Dropped Ingres tables"
   else
-    . ./drop_postgresql_tables
+    # hardcoded database name - should be a parameter
+    @scriptdir@/drop_postgresql_tables $*
     echo "Dropped PostgreSQL tables"
   fi
 fi