~gandelman-a/ubuntu/raring/keystone/pki_setup

« back to all changes in this revision

Viewing changes to debian/keystone.postinst

  • Committer: Chuck Short
  • Date: 2012-12-11 14:00:53 UTC
  • Revision ID: zulcss@ubuntu.com-20121211140053-n7575onqczj3otjq
Remove dbconfig-common setup, its not enabled by default anyways.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
set -e
4
4
 
5
 
. /usr/share/debconf/confmodule
6
 
. /usr/share/dbconfig-common/dpkg/postinst
7
5
 
8
6
# summary of how this script can be called:
9
7
#        * <new-preinst> `install'
19
17
                #su -s /bin/sh -c 'exec keystone database sync' keystone
20
18
                ;;
21
19
        configure)
22
 
                db_get keystone/configure_db
23
 
                if [ "$RET" = "true" ]; then
24
 
                        dbc_go keystone $@
25
 
                
26
 
                        case "$dbc_dbtype" in
27
 
                                sqlite3)
28
 
                                        SQL_CONNECTION="sqlite:///$dbc_basepath/$dbc_dbname.db"
29
 
                                        ;;
30
 
                                mysql)
31
 
                                        [ -n "$dbc_dbport" ] && dbport=:$dbc_dbport
32
 
                                        SQL_CONNECTION="mysql://$dbc_dbuser:$dbc_dbpass@${dbc_dbserver:-localhost}$dbport/$dbc_dbname"
33
 
                                        ;;
34
 
                                pgsql)
35
 
                                        [ -n "$dbc_dbport" ] && dbport=:$dbc_dbport
36
 
                                        SQL_CONNECTION="pgsql://$dbc_dbuser:$dbc_dbpass@${dbc_dbserver:-localhost}$dbport/$dbc_dbname"
37
 
                                        ;;
38
 
                                *)
39
 
                                        SQL_CONNECTION="sqlite:////var/lib/keystone/keystone.db"
40
 
                                        ;;
41
 
                        esac
42
 
                        [ -z "$2" -o "$dbc_install" = "true" ] \
43
 
                                && sed -e "s,_DBC_URL_,$SQL_CONNECTION," -i /etc/keystone/keystone.conf
 
20
                if ! grep -q sql_conenction /etc/keystone/keystone.conf
 
21
        then
 
22
                        su -s /bin/sh -c 'exec keystone-manage db_sync' keystone
44
23
                fi
45
 
                su -s /bin/sh -c 'exec keystone-manage db_sync' keystone
46
24
                ;;
47
25
        abort-upgrade)
48
26
                echo "aport upgrade called"