I've been looking into this some more.

It occured to me that the installation script from the baruwa.deb askes
twice to configure the mysql db.
This seemed a bit strange to me so I looked up the config file at
https://github.com/akissa/baruwa/blob/master/debian/config

I think I know now why the debconf settings are forgotten.
in line 16 it says :

db_reset baruwa/mysql/configure

which I think explains why the setting is forgotten (db_reset)

What is the reason that you explicity reset the value of
baruwa/mysql/configure ?
And is it possible to bypass that reset so that the
debconf-set-selections are not ignored ?

Rob



2011/10/5 Rob Verduijn <[email protected]>

> Hello,
>
> I've been strugling to get baruwa to work on lucid for some time now.
>
> To get baruwa to work with mailscanner/spamassassin/postfix you have to do
> quite some settings in a quite some config files.
> This introduces a very high risk of entering a typo which creates a
> non-functional setting.
> To counter this I've written a script to deal with the installation and
> have succeeded to deal with all configurations in a nice unattended way
> accept baruwa.
>
> I use debconf-set-selections to set the answers to questions that are asked
> by the baruwa configuration install:
> I obtained them via the command debconf-get-selections
> baruwa    baruwa/rabbitmq/mqpass    password   secretpassword
> baruwa    baruwa/mysql/dbadmpass    password    <why is this one empty??>
> baruwa    baruwa/mysql/dbpass    password    baruwa
> baruwa    baruwa/django/baruwapass    password
> baruwa    baruwa/webserver_type    select    apache2
> baruwa    baruwa/mysql/configure    boolean    true
> baruwa    baruwa/webserver/vhost    string    vhost.domain.com
> baruwa    baruwa/mysql/dbserver    string    localhost
> baruwa    baruwa/django/baruwaemail    string    secretpassword
> baruwa    baruwa/rabbitmq/mquser    string    rabbitmq
> baruwa    baruwa/mysql/dbuser    string    baruwa
> baruwa    baruwa/rabbitmq/mqvhost    string    baruwa
> baruwa    baruwa/mysql/dbadmin    string    root
> baruwa    baruwa/purge    boolean    false
> baruwa    baruwa/rabbitmq/mqhost    string    localhost
> baruwa    baruwa/mysql/dbname    string    baruwa
> baruwa    baruwa/django/baruwauser    string    baruwaadmin
>
> I enter them in my script using this syntax
> echo "baruwa baruwa/rabbitmq/mqpass password $rabbitmquserpw" |
> debconf-set-selections
> echo "baruwa baruwa/rabbitmq/mqhost string $fqdn" | debconf-set-selections
> echo "baruwa baruwa/rabbitmq/mquser string $rabbitmquser" |
> debconf-set-selections
> echo "baruwa baruwa/rabbitmq/mqvhost string $mqvhost" |
> debconf-set-selections
> echo "baruwa baruwa/mysql/dbadmin string $mysqlrootuser" |
> debconf-set-selections
> echo "baruwa baruwa/mysql/dbadmpass password $mysqlrootpw" |
> debconf-set-selections
> echo "baruwa baruwa/mysql/dbname string $mysqlbaruwadbname" |
> debconf-set-selections
> echo "baruwa baruwa/mysql/dbuser string $mysqlbaruwauser" |
> debconf-set-selections
> echo "baruwa baruwa/mysql/dbpass password $mysqlbaruwauserpw" |
> debconf-set-selections
> echo "baruwa baruwa/mysql/configure boolean $mysqlconfigure" |
> debconf-set-selections
> echo "baruwa baruwa/mysql/dbserver string $mysqlserver" |
> debconf-set-selections
> echo "baruwa baruwa/django/baruwapass password $baruwaadminpw" |
> debconf-set-selections
> echo "baruwa baruwa/django/baruwauser string $baruwadbaccount" |
> debconf-set-selections
> echo "baruwa baruwa/django/baruwaemail string $rootmail" |
> debconf-set-selections
> echo "baruwa baruwa/webserver_type select $webserver" |
> debconf-set-selections
> echo "baruwa baruwa/webserver/vhost string $fqdn" | debconf-set-selections
> echo "baruwa baruwa/purge boolean $purgebaruwadbonremove" |
> debconf-set-selections
>
> all the variables have been verified to be set correctly and get substitued
> properly (using set -x)
>
> I've tested it so far that I run the script till this part and verified
> that a manual installtion of this bit works fine
> If I use the debconf-set-selections it seems that the baruwa installation
> script ignores some of these settings,
> cause some questions are still asked and some are not, even if I answer
> them the installation results in a failure.
>
> Anybody any ideas how this can be solved ?
>
> Rob
>
_______________________________________________
Baruwa mailing list
[email protected]
http://lists.baruwa.org/mailman/listinfo/baruwa
Keep Baruwa FREE - http://pledgie.com/campaigns/12056

Reply via email to