]> git.sur5r.net Git - bacula/bacula/commitdiff
Do all Ingres operations as the user invoking the script just as for all the other...
authorMarco van Wieringen <mvw@planets.elm.net>
Sat, 3 Apr 2010 19:16:50 +0000 (21:16 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:49:44 +0000 (16:49 +0200)
bacula/src/cats/create_ingres_database.in
bacula/src/cats/drop_ingres_database.in
bacula/src/cats/grant_ingres_privileges.in
bacula/src/cats/make_ingres_tables.in

index 8694391bd54486f111466d601bd9629b3071ebdd..a287352f8634fdb186623a05d51ddfbec6bac986 100755 (executable)
@@ -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
index c4d6e017f58f48fcafd3d29f98834c916bef0865..23c75fe287995334af042d1fbe5be4cd92d5aca7 100755 (executable)
@@ -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
index d937334542ead645a46c59ce4508ce780214745c..1aab5985d25618beb001ddda949c3f3ad28dc98e 100755 (executable)
@@ -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} $* <<END-OF-DATA
+if sql ${db_name} $* <<END-OF-DATA
 
 -- for tables
 GRANT ALL ON TABLE filename TO ${db_user};
index 379d4d79e605a23688dcca1f278bd73d67af6f13..24445df1b6e4a70893cb91f2d524bc88d85366c5 100755 (executable)
@@ -4,12 +4,9 @@
 #
 bindir=@SQL_BINDIR@
 PATH="$bindir:$PATH"
-#db_name=${db_name:-@db_name@}
-#db_user=${db_user:-@db_user@}
-db_name=@db_name@
-db_user=@db_user@
+db_name=${db_name:-@db_name@}
 
-sql $* -u${db_user} ${db_name} <<END-OF-DATA
+sql $* ${db_name} <<END-OF-DATA
 
 SET AUTOCOMMIT ON\g