]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/grant_mysql_privileges.in
Optimize tree.c a bit, take Scott's spec & patch
[bacula/bacula] / bacula / src / cats / grant_mysql_privileges.in
index d66c884a339eb3db1730ad3286d85830c98a6603..0c0c6a597b721beff32a04e858dbb1761471a8df 100644 (file)
@@ -1,23 +1,18 @@
 #!/bin/sh
 #
-# shell script to create Bacula database(s)
+# shell script to grant privileges to the bacula database
 #
-
 bindir=@SQL_BINDIR@
 
-if $bindir/mysql -u root -f <<END-OF-DATA
+if $bindir/mysql $* -u root -f <<END-OF-DATA
 use mysql
-grant all privileges on *.* to kern@localhost with grant option;
-grant all privileges on *.* to kern@"%" with grant option;
-grant all privileges on *.* to kelvin@localhost with grant option;
-grant all privileges on *.* to kelvin@"%" with grant option;
-grant all privileges on *.* to bacula@localhost with grant option;
-grant all privileges on *.* to bacula@"%" with grant option;
+grant all privileges on bacula.* to bacula@localhost with grant option;
+grant all privileges on bacula.* to bacula@"%" with grant option;
 select * from user;
 flush privileges;
 END-OF-DATA
 then
-   echo "Privileges for kern, kelvin, and bacula granted."
+   echo "Privileges for bacula granted."
    exit 0
 else
    echo "Error creating privileges."