Skip to content

Commit

Permalink
Debian: fixes migrating from psql with password
Browse files Browse the repository at this point in the history
Prevents a problem if migrating from a version without dbconfig to a version with dbconfig
and have a postgresql database with password access.
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Feb 17, 2015
1 parent 217730a commit 6fe0fb9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions debian/bareos-database-common.config.in
Expand Up @@ -57,6 +57,11 @@ if [ -r @scriptdir@/bareos-config-lib.sh ]; then
dbc_load_include="sh:/usr/lib/bareos/scripts/set_dbconfig_vars.sh"
# empty passwords require special treatment, see below
bareos_database_password=`get_database_password` || true
# if password is given, set authmethod to password,
# otherwise postgresql configuration will stay at default ident
if [ "${bareos_database_password}" ]; then
dbc_authmethod_user="password"
fi
fi
;;
*)
Expand Down

0 comments on commit 6fe0fb9

Please sign in to comment.