From: Eric Bollengier Date: Mon, 29 Feb 2016 16:53:01 +0000 (+0100) Subject: Fix #1653 about make_catalog_backup default user name X-Git-Tag: Release-7.4.1~22 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=96ec2af2cda926d6866ba71985d5a63bfe62c283;p=bacula%2Fbacula Fix #1653 about make_catalog_backup default user name --- diff --git a/bacula/src/cats/make_catalog_backup.in b/bacula/src/cats/make_catalog_backup.in index 637fcf7a6d..b77b108867 100755 --- a/bacula/src/cats/make_catalog_backup.in +++ b/bacula/src/cats/make_catalog_backup.in @@ -23,6 +23,7 @@ # default_db_type=@DEFAULT_DB_TYPE@ +user=${2:-@db_user@} # # See if the fifth argument is a valid backend name. @@ -74,7 +75,7 @@ case ${db_type} in else MYSQLHOST="" fi - ${BINDIR}/mysqldump -u ${2}${MYSQLPASSWORD}${MYSQLHOST} -f --opt $1 >$1.sql + ${BINDIR}/mysqldump -u ${user}${MYSQLPASSWORD}${MYSQLHOST} -f --opt $1 >$1.sql ;; postgresql) BINDIR=@POSTGRESQL_BINDIR@ @@ -88,7 +89,7 @@ case ${db_type} in PGHOST="" fi # you could also add --compress for compression. See man pg_dump - exec ${BINDIR}/pg_dump -c $PGHOST -U $2 $1 >$1.sql + exec ${BINDIR}/pg_dump -c $PGHOST -U $user $1 >$1.sql ;; esac #