Project

General

Profile

Bug #464 ยป 0001-Fixes-464-Debian-package-use-correct-ActiveRecord-ad.patch

Jochen Schalanda, 11/14/2010 09:49 AM

View differences:

extras/debian/conf/database-mysql.yml.template
production:
adapter: _DBC_DBTYPE_
database: _DBC_DBNAME_
host: _DBC_DBSERVER_
port: _DBC_DBPORT_
username: _DBC_DBUSER_
password: _DBC_DBPASS_
encoding: utf8
extras/debian/conf/database-pgsql.yml.template
production:
adapter: postgresql
database: _DBC_DBNAME_
host: _DBC_DBSERVER_
port: _DBC_DBPORT_
username: _DBC_DBUSER_
password: _DBC_DBPASS_
encoding: utf8
extras/debian/conf/database.yml.template
production:
adapter: _DBC_DBTYPE_
database: _DBC_DBNAME_
host: _DBC_DBSERVER_
port: _DBC_DBPORT_
username: _DBC_DBUSER_
password: _DBC_DBPASS_
encoding: utf8
extras/debian/config
# config maintainer script for foreman
set -e
#set -x
if [ ! -z "${DEBUG}" ]; then set -x; fi
# source debconf stuff
. /usr/share/debconf/confmodule
extras/debian/postinst
db_get foreman/database-type || true
DB_TYPE=${RET}
case "${DB_TYPE}" in
sqlite3)
dbc_generate_include_args='-o template_infile=/usr/share/foreman/templates/database-sqlite.yml.template'
;;
mysql|pgsql)
dbc_generate_include_args='-o template_infile=/usr/share/foreman/templates/database.yml.template'
;;
*)
exit 1;
;;
esac
if [ -z "${DB_TYPE}" ]; do
exit 1
done
dbc_generate_include_args='-o template_infile=/usr/share/foreman/templates/database-${DB_TYPE}.yml.template'
dbc_go foreman $@
extras/debian/postrm
db_purge
fi
if which ucf >/dev/null 2>&1; then
ucf --purge /etc/foreman/database.yml
ucf --purge /etc/foreman/email.yml
ucf --purge /etc/foreman/session.yml
ucf --debconf-ok --purge /etc/foreman/database.yml
ucf --debconf-ok --purge /etc/foreman/email.yml
ucf --debconf-ok --purge /etc/foreman/session.yml
fi
# package-generated or runtime files are removed
rm -f /usr/share/foreman/db/schema.db
    (1-1/1)