From 96ec2af2cda926d6866ba71985d5a63bfe62c283 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 29 Feb 2016 17:53:01 +0100 Subject: [PATCH] Fix #1653 about make_catalog_backup default user name --- bacula/src/cats/make_catalog_backup.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 # -- 2.39.5