On Mon, Oct 10, 2005 at 02:36:35PM -0400, sean finney wrote: > http://people.debian.org/~seanius/dbconfig-common/dbconfig-common_1.8.6_all.deb > > and let me know if it resolves your issue?
It resolves the mysql "postgres" user issue, that looks a lot cleaner. However I cannot install db-test twice. The scripts do not realise the difference between a new install and a re-install of the same version of the package. dpkg-reconfigure will also fail. However, it is pretty simple to fix, check $3 and if it exists do not use the create scripts. argv 1 db-test 2 configure 3 4 argstar db-test configure dbconfig-common: writing config to /etc/dbconfig-common/db-test.conf Creating config file /etc/dbconfig-common/db-test.conf with new version creating postgres user dbtest: success. verifying creation of user: success. creating database dbtest: success. verifying database dbtest exists: success. dbconfig-common: flushing administrative password fozzie:~# dpkg -i ~csmall/debian/db-example/db-test_2.1_all.deb (Reading database ... 45887 files and directories currently installed.) Preparing to replace db-test 2.1 (using .../db-example/db-test_2.1_all.deb) ... ===================================== argv 1 db-test 2 upgrade 3 4 argstar db-test upgrade 2.1 Unpacking replacement db-test ... ===================================== argv 1 db-test 2 upgrade 3 4 argstar db-test upgrade 2.1 Setting up db-test (2.1) ... argv 1 db-test 2 configure 3 4 argstar db-test configure 2.1 dbconfig-common: writing config to /etc/dbconfig-common/db-test.conf creating postgres user dbtest: already exists. creating database dbtest: already exists. error encountered populating database: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo" ERROR: relation "foo" already exists See the last argstar has "configure 2.1" the debug line is in dpkg/common and is echo argstar $* Alternatively, you could run something like psql -c '\dT' $dbname and check if any lines returned. Or have some sort of state stored somewhere. - Craig -- Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5 Eye-Net Consulting http://www.enc.com.au/ MIEE Debian developer csmall at : enc.com.au ieee.org debian.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]