]> git.sur5r.net Git - bacula/bacula/commitdiff
Use user arguments when upgrading catalog
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 21 Apr 2011 16:05:37 +0000 (18:05 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 21 Apr 2011 16:06:03 +0000 (18:06 +0200)
bacula/src/cats/update_mysql_tables.in
bacula/src/cats/update_postgresql_tables.in
bacula/updatedb/update_mysql_tables_11_to_12.in
bacula/updatedb/update_postgresql_tables_11_to_12.in

index 95783906af11700de4cf8df673bef18595cb8c46..8893acf29628abda00c4b3c5cb2de668fd13a100 100644 (file)
@@ -12,7 +12,7 @@ bindir=@MYSQL_BINDIR@
 PATH="$bindir:$PATH"
 db_name=@db_name@
 
-mysql ${db_name} -e "select VersionId from Version\G" >/tmp/$$
+mysql $* -D ${db_name} -e "select VersionId from Version\G" >/tmp/$$
 DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$`
 if [ $DBVERSION != 12 ] ; then
    echo " "
index cbc51850d322b512b0bf1b1981f467f17ab8f338..e4809e0605ec855407079a908cad70b6647bef2c 100644 (file)
@@ -13,7 +13,7 @@ bindir=@POSTGRESQL_BINDIR@
 PATH="$bindir:$PATH"
 db_name=@db_name@
 
-DBVERSION=`psql ${db_name} -t --pset format=unaligned -c "select VersionId from Version"`
+DBVERSION=`psql -d ${db_name} -t --pset format=unaligned -c "select VersionId from Version" $*`
 if [ $DBVERSION != 12 ] ; then
    echo " "
    echo "The existing database is version $DBVERSION !!"
index b2f6270e3139a0e30427a4f0954d0cb19051ff28..ea2afb67bd24090a0c1802d95a02e5d0972459a3 100644 (file)
@@ -10,7 +10,7 @@ bindir=@SQL_BINDIR@
 PATH="$bindir:$PATH"
 db_name=@db_name@
 
-mysql ${db_name} -e "select VersionId from Version\G" >/tmp/$$
+mysql $* -D ${db_name} -e "select VersionId from Version\G" >/tmp/$$
 DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$`
 if [ $DBVERSION != 11 ] ; then
    echo " "
index 35f294ed9e8163ed1f08487ff46cd955643408ad..8cadf7abc432783fd62b634381f074a37186316f 100644 (file)
@@ -11,7 +11,7 @@ bindir=@SQL_BINDIR@
 PATH="$bindir:$PATH"
 db_name=@db_name@
 
-DBVERSION=`psql ${db_name} -t --pset format=unaligned -c "select VersionId from Version"`
+DBVERSION=`psql -d ${db_name} -t --pset format=unaligned -c "select VersionId from Version" $*`
 if [ $DBVERSION != 11 ] ; then
    echo " "
    echo "The existing database is version $DBVERSION !!"