]> git.sur5r.net Git - bacula/bacula/commitdiff
Add patches from Roger HÃ¥kansson <hson <at> ludd.luth.se>
authorDan Langille <dan@langille.org>
Mon, 21 Feb 2005 00:09:38 +0000 (00:09 +0000)
committerDan Langille <dan@langille.org>
Mon, 21 Feb 2005 00:09:38 +0000 (00:09 +0000)
Improve the scripts so they work in a wider range of conditions.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1836 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/cats/create_postgresql_database.in
bacula/src/cats/drop_postgresql_tables.in
bacula/src/cats/grant_postgresql_privileges.in
bacula/src/cats/make_postgresql_tables.in
bacula/src/cats/update_postgresql_tables.in

index 5ec7a8f7e945835dd333d2a374ad87431a315662..1cbe61e9e6a4f9de938f9707a7c3f61b1b1b8930 100644 (file)
@@ -5,7 +5,7 @@
 
 bindir=@SQL_BINDIR@
 
-if $bindir/psql template1 $* -f - <<END-OF-DATA
+if $bindir/psql -f - -d template1 $* <<END-OF-DATA
 CREATE DATABASE bacula;
 END-OF-DATA
 then
index 35ec37784599c5125bdbfe52766f7ce4e8bc2b74..ad3ec4a93564236bdd5f0b72b6ee4f72fc7461d9 100644 (file)
@@ -4,8 +4,7 @@
 
 bindir=@SQL_BINDIR@
 
-if $bindir/psql $* -f - <<END-OF-DATA
-\c bacula
+if $bindir/psql -f - -d bacula $* <<END-OF-DATA
 drop table unsavedfiles;
 drop table basefiles;
 drop table jobmedia;
index 02c18fb8e5cf518ca186d89e8c9d1f5226bb987e..552232a7dd8e67bb3a8c853d6cbfa4495db51f55 100644 (file)
@@ -5,7 +5,7 @@
 USER=bacula
 bindir=@SQL_BINDIR@
 
-if $bindir/psql $* bacula -f - <<END-OF-DATA
+if $bindir/psql -f - -d bacula $* <<END-OF-DATA
 
 create user ${USER};
 
index 97ab2806336a8694cd48666936ed35bed23d9756..b1e759bb2c76bb389955fbd8b61ae08b2698c00d 100644 (file)
@@ -4,7 +4,7 @@
 #
 bindir=@SQL_BINDIR@
 
-if $bindir/psql $* bacula -f - <<END-OF-DATA
+if $bindir/psql -f - -d bacula $* <<END-OF-DATA
 
 CREATE TABLE filename
 (
index c8e7eec63222d9db52e0a793a081b58d0e11dd66..109700161a7d7978c88afc18f177ebda83c662dc 100755 (executable)
@@ -9,8 +9,7 @@ echo "this script may take several minutes to run."
 echo " "
 bindir=@SQL_BINDIR@
 
-if $bindir/psql $* -f - <<END-OF-DATA
-\c bacula
+if $bindir/psql -f - -d bacula $* <<END-OF-DATA
 
 ALTER TABLE media ADD COLUMN labeltype integer;
 UPDATE media SET labeltype=0;