dbconfig: use generic sourcing not only psql

This commit is contained in:
Jérôme Schneider 2013-11-19 13:09:47 +01:00
parent da4e017ea7
commit 8ad9b0a68b
2 changed files with 10 additions and 7 deletions

View File

@ -3,11 +3,14 @@
# source debconf stuff
. /usr/share/debconf/confmodule
# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
. /usr/share/dbconfig-common/dpkg/config.pgsql
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
. /usr/share/dbconfig-common/dpkg/config
dbc_dbtypes="pgsql"
dbc_pgsql_createdb_encoding="UTF8"
dbc_dbuser=authentic
dbc_dbname=authentic2
dbc_authmethod_user="ident"
dbc_dbuser="authentic"
dbc_dbname="authentic2"
dbc_remote_questions_default=true
dbc_go authentic2 $@
fi

View File

@ -39,13 +39,13 @@ case "$1" in
# source debconf stuff
. /usr/share/debconf/confmodule
# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then
dbc_generate_include=template:/etc/authentic2/db.conf
if [ -f /usr/share/dbconfig-common/dpkg/postinst ]; then
. /usr/share/dbconfig-common/dpkg/postinst
dbc_generate_include="template:/etc/authentic2/db.conf"
dbc_generate_include_args="-o template_infile=/usr/share/authentic2/templates/db.conf -U"
dbc_generate_include_owner="root:root"
dbc_generate_include_perms="644"
dbc_sql_substitutions=yes
. /usr/share/dbconfig-common/dpkg/postinst.pgsql
dbc_go authentic2 $@
fi