From 25c4b55079ba3083bb13ca3f8426ee129ad49d47 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sat, 3 Apr 2010 21:16:50 +0200 Subject: [PATCH] Do all Ingres operations as the user invoking the script just as for all the other databases. The grant script will make sure the db_user will have the proper access rights to the database tables and sequences. --- bacula/src/cats/create_ingres_database.in | 3 +-- bacula/src/cats/drop_ingres_database.in | 3 +-- bacula/src/cats/grant_ingres_privileges.in | 3 +-- bacula/src/cats/make_ingres_tables.in | 7 ++----- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/bacula/src/cats/create_ingres_database.in b/bacula/src/cats/create_ingres_database.in index 8694391bd5..a287352f86 100755 --- a/bacula/src/cats/create_ingres_database.in +++ b/bacula/src/cats/create_ingres_database.in @@ -5,7 +5,6 @@ bindir=@SQL_BINDIR@ db_name=@db_name@ -db_user=@db_user@ # use SQL_ASCII to be able to put any filename into # the database even those created with unusual character sets @@ -21,7 +20,7 @@ ENCODING="ENCODING 'SQL_ASCII'" # #ENCODING="ENCODING 'UTF8'" -if createdb $* -u${db_user} ${db_name} +if createdb $* ${db_name} then echo "Creation of ${db_name} database succeeded." else diff --git a/bacula/src/cats/drop_ingres_database.in b/bacula/src/cats/drop_ingres_database.in index c4d6e017f5..23c75fe287 100755 --- a/bacula/src/cats/drop_ingres_database.in +++ b/bacula/src/cats/drop_ingres_database.in @@ -5,9 +5,8 @@ bindir=@SQL_BINDIR@ db_name=@db_name@ -db_user=@db_user@ -if destroydb -u${db_user} ${db_name} +if destroydb ${db_name} then echo "Drop of ${db_name} database succeeded." else diff --git a/bacula/src/cats/grant_ingres_privileges.in b/bacula/src/cats/grant_ingres_privileges.in index d937334542..1aab5985d2 100755 --- a/bacula/src/cats/grant_ingres_privileges.in +++ b/bacula/src/cats/grant_ingres_privileges.in @@ -2,11 +2,10 @@ # # shell script TO GRANT privileges to the bacula database # -db_user=${db_user:-@db_user@} bindir=@SQL_BINDIR@ db_name=${db_name:-@db_name@} -if sql -u${db_user} ${db_name} $* <