File: nova-common.config

package info (click to toggle)
nova 2012.1.1-18
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 18,900 kB
  • sloc: python: 102,511; sql: 3,318; sh: 2,488; xml: 1,131; makefile: 146
file content (44 lines) | stat: -rw-r--r-- 1,102 bytes parent folder | download
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