]> git.sur5r.net Git - bacula/bacula/commitdiff
Create user in the right database for Ingres.
authorMarco van Wieringen <mvw@planets.elm.net>
Sat, 3 Apr 2010 20:09:52 +0000 (22:09 +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/grant_ingres_privileges.in

index a287352f8634fdb186623a05d51ddfbec6bac986..1e4973de705a52006cbe0be5c9b17909a2dcd4c3 100755 (executable)
@@ -4,6 +4,7 @@
 #
 
 bindir=@SQL_BINDIR@
+PATH="$bindir:$PATH"
 db_name=@db_name@
 
 # use SQL_ASCII to be able to put any filename into
@@ -26,4 +27,5 @@ then
 else
    echo "Creation of ${db_name} database failed."
 fi
+
 exit 0
index 1aab5985d25618beb001ddda949c3f3ad28dc98e..82bab040d4af5ca67cde4732b855acd8e25a3cad 100755 (executable)
@@ -4,6 +4,12 @@
 #
 bindir=@SQL_BINDIR@
 db_name=${db_name:-@db_name@}
+db_user=${db_user:-@db_user@}
+
+sql iidbdb $* <<END-OF-DATA
+CREATE USER ${db_user}
+\g
+END-OF-DATA
 
 if sql ${db_name} $* <<END-OF-DATA