]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/grant_bacula_privileges.in
ebl fix escape bug
[bacula/bacula] / bacula / src / cats / grant_bacula_privileges.in
index 8c2a1eaff5fffea8467b1db29b1f4562f0931eef..5e9f4e735f1d985f5f66e7fb42f7b47a15e09be5 100755 (executable)
@@ -4,18 +4,17 @@
 #  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
-  if test xpostgresql = x@DB_NAME@ ; then 
+  if test xpostgresql = x@DB_TYPE@ ; then 
     echo "Granting PostgreSQL privileges"
-    # hard coded database name
-    . ./grant_postgresql_privileges bacula
+    @scriptdir@/grant_postgresql_privileges $*
   else
-    if test xsqlite = x@DB_NAME@ ; then 
+    if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then 
       echo "Granting SQLite privileges"
-      # hard coded database name
-      . ./grant_sqlite_privileges
+      @scriptdir@/grant_@DB_TYPE@_privileges $*
+    fi
   fi
 fi