On Wed, 2006-09-13 at 08:16 +0200, Michael Ablassmeier wrote: > 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.
okay... > # 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 shouldn't that be "-pdbc_dbpass"? there is no variable named "db_password" in /etc/dbconfig-common/zabbix-server-mysql.conf. > > > kida:/home/abi# dbconfig-load-include > > > /etc/dbconfig-common/zabbix-server-mysql.conf -f sh -pfoo > > > dbc_dbpass='' which does exactly what it should do. to fully explain this: - dbconfig-load-include (d-l-i) is used to parse a "3rd party" config file. the input can contain arbitrary variable names and can be in an arbitrary format (as long as it's supported). the output is strictly defined as the format which would be used in a dbconfig-common config file (i.e.: dbc_dbuser, dbc_dbpass, etc) - dbconfig-generate-include (d-g-i) is used to *output* a "3rd party" config file, using a dbconfig-common config file as input. thus in this case the input is strictly defined, and the output is in arbitrary format with arbitrary variable names. > hm, yes, dbconfig-generate-include works, but im pretty sure i was using > dbconfig-load-include before which worked nicely. if that was the case, i think that the feature you were using was in fact a bug :) sean
signature.asc
Description: This is a digitally signed message part