hi sean,

On Wed, Sep 13, 2006 at 12:20:42AM +0200, sean finney wrote:
> On Tue, 2006-09-12 at 14:34 +0200, Michael Ablassmeier wrote:
> > as with 1.8.21 dbconfig-load-include always returns the default variable
> > names, no matter what varname is specified. It also fails to provide the
> > data:
> 
> what exactly are you trying to do?  dbconfig-load-include is for reading
> in configuration files to preseed dbconfig-common when migrating from a
> previously non-dbconfig-using package.  if you're trying to generate a
> config file based on the dbconfig-common configuration, you should be
> using dbconfig-generate-include.

on zabbix-server-mysql installation a user can possibly choose to
autogenerate the password for the database user. If zabbix-frontend-php
is installed on the same machine as zabbix-server-mysql i used to read
the database password for the database user specified during the server
installation using dbconfig-load-include (in postinst, in order to skip
this debconf question for the frontend package (or to get the
autogenerated password)), which was working well. 

        # lest check if zabbix-server-mysql is installed and use
        # its configured database password, dont ask the user
        if [ -e /etc/dbconfig-common/zabbix-server-mysql.conf ]; then
                eval `dbconfig-load-include 
/etc/dbconfig-common/zabbix-server-mysql.conf -f sh -pdb_password`
        else
                RET=""
                db_get zabbix-frontend-php/database-password || true
                db_password="$RET"
                [ "$db_password" = "none" ] && db_password=""
        fi

> >  kida:/home/abi# dbconfig-load-include 
> > /etc/dbconfig-common/zabbix-server-mysql.conf -f sh -pfoo
> >  dbc_dbpass=''
> > 
> >  kida:/home/abi# grep dbc_dbpass 
> > /etc/dbconfig-common/zabbix-server-mysql.conf
> >  # dbc_dbpass: database user password
> >  dbc_dbpass="mydamsecurepasswordisset"
> 
> this is the intended behaviour, though the file should be the last
> argument (i think getopt is covering for this anyway, though).  what
> you're saying is:
> 
> - read the input file /etc/dbconfig-common/zabbix-server-mysql.conf
> - the input file is in sh format
> - use the variable named "foo" in this file as the default password
> 
> again, i'm pretty sure you want to be using dbconfig-generate-include.

hm, yes, dbconfig-generate-include works, but im pretty sure i was using
dbconfig-load-include before which worked nicely.

bye,
    - michael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to