[prev in list] [next in list] [prev in thread] [next in thread]
List: bacula-commits
Subject: [Bacula-commits] SF.net SVN: bacula:[7514] trunk/bacula
From: ricozz () users ! sourceforge ! net
Date: 2008-08-28 11:23:22
Message-ID: E1KYfb0-0007sh-3Z () bj8yhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 7514
http://bacula.svn.sourceforge.net/bacula/?rev=7514&view=rev
Author: ricozz
Date: 2008-08-28 11:23:21 +0000 (Thu, 28 Aug 2008)
Log Message:
-----------
ebl Modify catalog scripts to have an easier packaging integration,
using default variables.
Make difference between SQLite3 and SQLite in db_get_type()
Modified Paths:
--------------
trunk/bacula/src/cats/grant_mysql_privileges.in
trunk/bacula/src/cats/grant_postgresql_privileges.in
trunk/bacula/src/cats/make_mysql_tables.in
trunk/bacula/src/cats/make_postgresql_tables.in
trunk/bacula/src/cats/sqlite.c
trunk/bacula/technotes-2.5
Modified: trunk/bacula/src/cats/grant_mysql_privileges.in
===================================================================
--- trunk/bacula/src/cats/grant_mysql_privileges.in 2008-08-27 21:11:04 UTC (rev \
7513)
+++ trunk/bacula/src/cats/grant_mysql_privileges.in 2008-08-28 11:23:21 UTC (rev \
7514) @@ -2,19 +2,19 @@
#
# shell script to grant privileges to the bacula database
#
-USER=@db_user@
+db_user=${db_user-@db_user@}
bindir=@SQL_BINDIR@
-db_name=@db_name@
+db_name=${db_name-@db_name@}
if $bindir/mysql $* -u root -f <<END-OF-DATA
use mysql
-grant all privileges on ${db_name}.* to ${USER}@localhost;
-grant all privileges on ${db_name}.* to ${USER}@"%";
+grant all privileges on ${db_name}.* to ${db_user}@localhost;
+grant all privileges on ${db_name}.* to ${db_user}@"%";
select * from user;
flush privileges;
END-OF-DATA
then
- echo "Privileges for ${USER} granted on ${db_name}."
+ echo "Privileges for ${db_user} granted on ${db_name}."
exit 0
else
echo "Error creating privileges."
Modified: trunk/bacula/src/cats/grant_postgresql_privileges.in
===================================================================
--- trunk/bacula/src/cats/grant_postgresql_privileges.in 2008-08-27 21:11:04 UTC (rev \
7513)
+++ trunk/bacula/src/cats/grant_postgresql_privileges.in 2008-08-28 11:23:21 UTC (rev \
7514) @@ -2,60 +2,60 @@
#
# shell script to grant privileges to the bacula database
#
-USER=@db_user@
+db_user=${db_user-@db_user@}
bindir=@SQL_BINDIR@
-db_name=@db_name@
+db_name=${db_name-@db_name@}
if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
-create user ${USER};
+create user ${db_user};
-- for tables
-grant all on unsavedfiles to ${USER};
-grant all on basefiles to ${USER};
-grant all on jobmedia to ${USER};
-grant all on file to ${USER};
-grant all on job to ${USER};
-grant all on media to ${USER};
-grant all on client to ${USER};
-grant all on pool to ${USER};
-grant all on fileset to ${USER};
-grant all on path to ${USER};
-grant all on filename to ${USER};
-grant all on counters to ${USER};
-grant all on version to ${USER};
-grant all on cdimages to ${USER};
-grant all on mediatype to ${USER};
-grant all on storage to ${USER};
-grant all on device to ${USER};
-grant all on status to ${USER};
-grant all on location to ${USER};
-grant all on locationlog to ${USER};
-grant all on log to ${USER};
-grant all on jobstat to ${USER};
+grant all on unsavedfiles to ${db_user};
+grant all on basefiles to ${db_user};
+grant all on jobmedia to ${db_user};
+grant all on file to ${db_user};
+grant all on job to ${db_user};
+grant all on media to ${db_user};
+grant all on client to ${db_user};
+grant all on pool to ${db_user};
+grant all on fileset to ${db_user};
+grant all on path to ${db_user};
+grant all on filename to ${db_user};
+grant all on counters to ${db_user};
+grant all on version to ${db_user};
+grant all on cdimages to ${db_user};
+grant all on mediatype to ${db_user};
+grant all on storage to ${db_user};
+grant all on device to ${db_user};
+grant all on status to ${db_user};
+grant all on location to ${db_user};
+grant all on locationlog to ${db_user};
+grant all on log to ${db_user};
+grant all on jobstat to ${db_user};
-- for sequences on those tables
-grant select, update on filename_filenameid_seq to ${USER};
-grant select, update on path_pathid_seq to ${USER};
-grant select, update on fileset_filesetid_seq to ${USER};
-grant select, update on pool_poolid_seq to ${USER};
-grant select, update on client_clientid_seq to ${USER};
-grant select, update on media_mediaid_seq to ${USER};
-grant select, update on job_jobid_seq to ${USER};
-grant select, update on file_fileid_seq to ${USER};
-grant select, update on jobmedia_jobmediaid_seq to ${USER};
-grant select, update on basefiles_baseid_seq to ${USER};
-grant select, update on storage_storageid_seq to ${USER};
-grant select, update on mediatype_mediatypeid_seq to ${USER};
-grant select, update on device_deviceid_seq to ${USER};
-grant select, update on location_locationid_seq to ${USER};
-grant select, update on locationlog_loclogid_seq to ${USER};
-grant select, update on log_logid_seq to ${USER};
+grant select, update on filename_filenameid_seq to ${db_user};
+grant select, update on path_pathid_seq to ${db_user};
+grant select, update on fileset_filesetid_seq to ${db_user};
+grant select, update on pool_poolid_seq to ${db_user};
+grant select, update on client_clientid_seq to ${db_user};
+grant select, update on media_mediaid_seq to ${db_user};
+grant select, update on job_jobid_seq to ${db_user};
+grant select, update on file_fileid_seq to ${db_user};
+grant select, update on jobmedia_jobmediaid_seq to ${db_user};
+grant select, update on basefiles_baseid_seq to ${db_user};
+grant select, update on storage_storageid_seq to ${db_user};
+grant select, update on mediatype_mediatypeid_seq to ${db_user};
+grant select, update on device_deviceid_seq to ${db_user};
+grant select, update on location_locationid_seq to ${db_user};
+grant select, update on locationlog_loclogid_seq to ${db_user};
+grant select, update on log_logid_seq to ${db_user};
END-OF-DATA
then
- echo "Privileges for ${USER} granted on ${db_name}."
+ echo "Privileges for ${db_user} granted on ${db_name}."
exit 0
else
echo "Error creating privileges."
Modified: trunk/bacula/src/cats/make_mysql_tables.in
===================================================================
--- trunk/bacula/src/cats/make_mysql_tables.in 2008-08-27 21:11:04 UTC (rev 7513)
+++ trunk/bacula/src/cats/make_mysql_tables.in 2008-08-28 11:23:21 UTC (rev 7514)
@@ -3,7 +3,7 @@
# shell script to create Bacula MySQL tables
#
bindir=@SQL_BINDIR@
-db_name=@db_name@
+db_name=${db_name-@db_name@}
if $bindir/mysql $* -f <<END-OF-DATA
USE ${db_name};
Modified: trunk/bacula/src/cats/make_postgresql_tables.in
===================================================================
--- trunk/bacula/src/cats/make_postgresql_tables.in 2008-08-27 21:11:04 UTC (rev \
7513)
+++ trunk/bacula/src/cats/make_postgresql_tables.in 2008-08-28 11:23:21 UTC (rev \
7514) @@ -3,7 +3,7 @@
# shell script to create Bacula PostgreSQL tables
#
bindir=@SQL_BINDIR@
-db_name=@db_name@
+db_name=${db_name-@db_name@}
$bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
Modified: trunk/bacula/src/cats/sqlite.c
===================================================================
--- trunk/bacula/src/cats/sqlite.c 2008-08-27 21:11:04 UTC (rev 7513)
+++ trunk/bacula/src/cats/sqlite.c 2008-08-28 11:23:21 UTC (rev 7514)
@@ -59,14 +59,17 @@
int QueryDB(const char *file, int line, JCR *jcr, B_DB *db, char *select_cmd);
-
/*
* Retrieve database type
*/
const char *
db_get_type(void)
{
+#ifdef HAVE_SQLITE3
+ return "SQLite3";
+#else
return "SQLite";
+#endif
}
/*
Modified: trunk/bacula/technotes-2.5
===================================================================
--- trunk/bacula/technotes-2.5 2008-08-27 21:11:04 UTC (rev 7513)
+++ trunk/bacula/technotes-2.5 2008-08-28 11:23:21 UTC (rev 7514)
@@ -32,6 +32,10 @@
General:
+28Aug08
+ebl Modify catalog scripts to have an easier packaging integration,
+ using default variables.
+ Make difference between SQLite3 and SQLite in db_get_type()
27Aug08
kes Apply most of changes in a patch from:
Michael Stapelberg <michael+bacula@stapelberg.de>
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-commits mailing list
Bacula-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic