]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/grant_bacula_privileges.in
bat: Use BVFS on bRestore view
[bacula/bacula] / bacula / src / cats / grant_bacula_privileges.in
index 6fdb1b12b1814d476c66487f9307555d0e8c8ded..d18a8731fb8b72a2880b8e33eeb45ba987b943fb 100755 (executable)
@@ -4,11 +4,20 @@
 #  Bacula tables for PostgreSQL or MySQL.
 # SQLite does not have permissions.
 #
-if test xmysql = x@DB_NAME@ ; then 
+if test xmysql = x@DB_TYPE@ ; then 
   echo "Granting MySQL privileges"
-  . ./grant_mysql_privileges
+  @scriptdir@/grant_mysql_privileges $*
 else
-  echo "Granting PostgreSQL privileges"
-  # hard coded database name
-  . ./grant_postgresql_privileges bacula
+  if test xpostgresql = x@DB_TYPE@ ; then 
+    echo "Granting PostgreSQL privileges"
+    @scriptdir@/grant_postgresql_privileges $*
+  elif test xingres = x@DB_TYPE@ ; then
+    echo "Granting Ingres privileges"
+    @scriptdir@/grant_ingres_privileges $*
+  else
+    if test xsqlite3 = x@DB_TYPE@ ; then 
+      echo "Granting SQLite privileges"
+      @scriptdir@/grant_@DB_TYPE@_privileges $*
+    fi
+  fi
 fi