1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
NOVA_COM_DEF=/etc/default/nova-common
# Set the debconf value to whatever is in the config file
if [ -f ${NOVA_COM_DEF} ] ; then
. ${NOVA_COM_DEF}
fi
if ! [ "${NOVA_ENABLE}" = "true" ] ; then
NOVA_ENABLE=false
fi
db_set nova-common/start_services ${NOVA_ENABLE}
db_input low nova-common/start_services || true
db_go
# Write a default config file if it doesn't exist yet
# note that the value will be overwritten by the postinst
if ! [ -f ${NOVA_COM_DEF} ] ; then
echo "# defaults file for nova daemons
# start nova daemons from init.d script?
# only allowed values are \"true\" and \"false\"
NOVA_ENABLE=true" >${NOVA_COM_DEF}
fi
db_input high nova-common/configure_db || true
db_go
db_get nova-common/configure_db
if [ "$RET" = "true" ]; then
if [ -f /usr/share/dbconfig-common/dpkg/config ]
then
dbc_dbtypes="sqlite3, mysql, pgsql"
dbc_authmethod_user="password"
dbc_basepath="/var/lib/nova"
dbc_dbname="nova"
. /usr/share/dbconfig-common/dpkg/config
dbc_go nova-common $@
fi
fi
|