[Dbconfig-common-devel] Forgotten dbc_dbname
Miguel Gea Milvaques
debian at miguelgea.com
Sun Sep 11 09:00:57 UTC 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Sean,
It seems there are a problem with postgres packages with
dbconfig-common. In /usr/share/dbconfig-common/dpkg/postinst, you could see:
...
### now, create the app user account
###
$dbc_createuser_cmd || dbc_install_error "creating user"
[ "$dbc_tried_again" ] && return 0
###
### create the database
###
$dbc_createdb_cmd || dbc_install_error "creating database"
[ "$dbc_tried_again" ] && return 0
...
if debug the dbc_dbname in this file before and after app user account
creation, you could see it changes the dbc_dbname variable to template1.
I've been looking for the error in dbc_pgsql_createuser function and
others, but I don't found it. I've solved it modifying those lines to:
###
### now, create the app user account
###
dbc_tmp_dbname=$dbc_dbname
$dbc_createuser_cmd || dbc_install_error "creating user"
[ "$dbc_tried_again" ] && return 0
dbc_dbname=$dbc_tmp_dbname
echo createuser $dbc_dbname 2>&1 >>/tmp/kuku2
###
### create the database
###
$dbc_createdb_cmd || dbc_install_error "creating database"
[ "$dbc_tried_again" ] && return 0
I don't think this is the best form to solve it, because there are a bug
in dbc_createuser_cmd funtion, so I don't uploaded it to the cvs.
I supose there are a problem with a local variable, but I don't find it
and "four eyes see more two".
- --
e-mail: Miguel Gea Milvaques <debian(@nospam)miguelgea.com
Blog: http://www.livejournal.com/users/xerakko/
GnuPG key: 0x580808C4
Key fingerprint = 85A0 06FD 9A6C 4701 27C2 5536 3533 50CA 5808 08C4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDI/JINTNQylgICMQRAv0pAKCavimpP7P/w8Vq99fbmSsgi65MhwCeKY2X
TSAJivfUF+ztf3DLavDsHPo=
=OaQn
-----END PGP SIGNATURE-----
More information about the Dbconfig-common-devel
mailing list