[prev in list] [next in list] [prev in thread] [next in thread]
List: bacula-commits
Subject: [Bacula-commits] SF.net SVN: bacula:[7515]
From: ricozz () users ! sourceforge ! net
Date: 2008-08-28 11:26:12
Message-ID: E1KYfdk-0007tG-Ly () bj8yhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 7515
http://bacula.svn.sourceforge.net/bacula/?rev=7515&view=rev
Author: ricozz
Date: 2008-08-28 11:26:11 +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:
--------------
branches/Branch-2.4/bacula/src/cats/grant_mysql_privileges.in
branches/Branch-2.4/bacula/src/cats/grant_postgresql_privileges.in
branches/Branch-2.4/bacula/src/cats/make_mysql_tables.in
branches/Branch-2.4/bacula/src/cats/make_postgresql_tables.in
branches/Branch-2.4/bacula/src/cats/sqlite.c
branches/Branch-2.4/bacula/technotes-2.4
Modified: branches/Branch-2.4/bacula/src/cats/grant_mysql_privileges.in
===================================================================
--- branches/Branch-2.4/bacula/src/cats/grant_mysql_privileges.in 2008-08-28 11:23:21 \
UTC (rev 7514)
+++ branches/Branch-2.4/bacula/src/cats/grant_mysql_privileges.in 2008-08-28 11:26:11 \
UTC (rev 7515) @@ -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: branches/Branch-2.4/bacula/src/cats/grant_postgresql_privileges.in
===================================================================
--- branches/Branch-2.4/bacula/src/cats/grant_postgresql_privileges.in 2008-08-28 \
11:23:21 UTC (rev 7514)
+++ branches/Branch-2.4/bacula/src/cats/grant_postgresql_privileges.in 2008-08-28 \
11:26:11 UTC (rev 7515) @@ -2,59 +2,59 @@
#
# 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 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};
-- 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: branches/Branch-2.4/bacula/src/cats/make_mysql_tables.in
===================================================================
--- branches/Branch-2.4/bacula/src/cats/make_mysql_tables.in 2008-08-28 11:23:21 UTC \
(rev 7514)
+++ branches/Branch-2.4/bacula/src/cats/make_mysql_tables.in 2008-08-28 11:26:11 UTC \
(rev 7515) @@ -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: branches/Branch-2.4/bacula/src/cats/make_postgresql_tables.in
===================================================================
--- branches/Branch-2.4/bacula/src/cats/make_postgresql_tables.in 2008-08-28 11:23:21 \
UTC (rev 7514)
+++ branches/Branch-2.4/bacula/src/cats/make_postgresql_tables.in 2008-08-28 11:26:11 \
UTC (rev 7515) @@ -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: branches/Branch-2.4/bacula/src/cats/sqlite.c
===================================================================
--- branches/Branch-2.4/bacula/src/cats/sqlite.c 2008-08-28 11:23:21 UTC (rev 7514)
+++ branches/Branch-2.4/bacula/src/cats/sqlite.c 2008-08-28 11:26:11 UTC (rev 7515)
@@ -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: branches/Branch-2.4/bacula/technotes-2.4
===================================================================
--- branches/Branch-2.4/bacula/technotes-2.4 2008-08-28 11:23:21 UTC (rev 7514)
+++ branches/Branch-2.4/bacula/technotes-2.4 2008-08-28 11:26:11 UTC (rev 7515)
@@ -1,6 +1,10 @@
Technical notes on version 2.4
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()
26Aug08
kes Attempt to fix bug #1128 InChanger flag cleared during Migration
job when reading from one autochanger and writing to another.
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