[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using dbconfig-common in maintainer scripts. [UPDATE]



Greetings,

I have decided to do an update fro those interested. I have made several
adjustments to my maintainer scripts following advice from Craig Small
and lintian. I am still having no joy with dbconfig-common, as such I
set -x in my postinst script to ger some idea of what has happened. At
this point I am going to attach my config and postinst scripts and a
copy of the output when the postinst file is run. 

Would anyone know how I can tell dbconfig-common to be verbose and
produce a logfile?

Any further help is much appreciated.

-- 
Nikolai Lusan <nikolai@lusan.id.au>
+ CONFIG_FILE=/etc/cluebringer/cluebringer.conf
+ INIT_FILE=/etc/init.d/postfix-cluebringer
+ DAEMON=postfix-cluebringer
+ . /usr/share/debconf/confmodule
+ [ !  ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [  ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/postfix-cluebringer.postinst configure 
+ CONFIG_FILE=/etc/cluebringer/cluebringer.conf
+ INIT_FILE=/etc/init.d/postfix-cluebringer
+ DAEMON=postfix-cluebringer
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z  ]
+ exec
+ [  ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ . /usr/share/dbconfig-common/dpkg/postinst
+ dbc_first_version=2.0.10-1
+ dbc_generate_include=template:/etc/cluebringer/cluebringer.conf
+ dbc_generate_include_perms=660
+ dbc_generate_include_owner=root:www-data
+ dbc_generate_include_args=-o template_infile=/usr/share/doc/postfix-cluebringer/templates/cluebringer.conf -U
+ dbc_go postfix-cluebringer configure
+ local importing_from_non_dbc upgrading reconfiguring f tsubstfile upgrades_pending dbc_dumpfile _dbc_asuser reinstall
+ . /usr/share/dbconfig-common/dpkg/common
+ . /usr/share/dbconfig-common/internal/common
+ [  ]
+ _dbc_logfile=/var/log/dbconfig-common/dbc.log
+ _dbc_debug (postinst) dbc_go() postfix-cluebringer configure
+ [  ]
+ dbc_config postfix-cluebringer configure
+ _dbc_debug dbc_config() postfix-cluebringer configure
+ [  ]
+ dbc_share=/usr/share/dbconfig-common
+ dbc_package=postfix-cluebringer
+ echo postfix-cluebringer
+ cut -d_ -f1
+ dbc_basepackage=postfix-cluebringer
+ dbc_command=configure
+ dbc_oldversion=
+ _dbc_sanity_check package command
+ [ 2 -ne 0 ]
+ [ -z postfix-cluebringer ]
+ shift
+ [ 1 -ne 0 ]
+ [ -z configure ]
+ shift
+ [ 0 -ne 0 ]
+ dbc_confdir=/etc/dbconfig-common
+ dbc_globalconfig=/etc/dbconfig-common/config
+ dbc_packageconfig=/etc/dbconfig-common/postfix-cluebringer.conf
+ dbc_standard_templates=database-type dbconfig-install dbconfig-upgrade dbconfig-remove dbconfig-reinstall password-confirm app-password-confirm purge upgrade-backup passwords-do-not-match install-error upgrade-error remove-error internal/reconfiguring internal/skip-preseed missing-db-package-error
+ dbc_mysql_templates=mysql/method remote/host remote/newhost mysql/app-pass mysql/admin-user mysql/admin-pass remote/port db/dbname db/app-user
+ dbc_pgsql_templates=pgsql/method remote/host remote/newhost pgsql/app-pass pgsql/admin-user pgsql/admin-pass remote/port pgsql/authmethod-admin pgsql/authmethod-user pgsql/changeconf pgsql/manualconf db/dbname db/app-user pgsql/no-empty-passwords
+ dbc_sqlite_templates=db/dbname db/basepath
+ dbc_all_supported_dbtypes=mysql pgsql sqlite sqlite3
+ dbc_authenticated_dbtypes=mysql pgsql
+ dbc_remote_dbtypes=mysql pgsql
+ dbc_fs_dbtypes=sqlite sqlite3
+ [ -f /etc/dbconfig-common/config ]
+ . /etc/dbconfig-common/config
+ dbc_remember_admin_pass=false
+ dbc_remote_questions_default=true
+ [ true = true ]
+ dbc_remote_questions_priority=high
+ dbc_default_pgsql_authmethod_admin=password
+ dbc_set_dbtype_defaults
+ _dbc_debug dbc_set_dbtype_defaults() 
+ [  ]
+ [  ]
+ dbc_default_basepath=
+ dbc_db_installed_cmd=dbc__db_installed
+ dbc_register_templates=database-type dbconfig-install dbconfig-upgrade dbconfig-remove dbconfig-reinstall password-confirm app-password-confirm purge upgrade-backup passwords-do-not-match install-error upgrade-error remove-error internal/reconfiguring internal/skip-preseed missing-db-package-error mysql/method remote/host remote/newhost mysql/app-pass mysql/admin-user mysql/admin-pass remote/port db/dbname db/app-user pgsql/method remote/host remote/newhost pgsql/app-pass pgsql/admin-user pgsql/admin-pass remote/port pgsql/authmethod-admin pgsql/authmethod-user pgsql/changeconf pgsql/manualconf db/dbname db/app-user pgsql/no-empty-passwords db/dbname db/basepath
+ [  ]
+ dbc_dgi_on_manual=true
+ [ configure = configure ]
+ dbc_read_package_debconf
+ _dbc_debug dbc_read_package_debconf() 
+ [  ]
+ _dbc_sanity_check package
+ [ 1 -ne 0 ]
+ [ -z postfix-cluebringer ]
+ shift
+ [ 0 -ne 0 ]
+ [ !  ]
+ db_get postfix-cluebringer/database-type
+ _db_cmd GET postfix-cluebringer/database-type
+ IFS=  printf %s\n GET postfix-cluebringer/database-type
+ IFS=
 read -r _db_internal_line
+ RET=10 postfix-cluebringer/database-type doesn't exist
+ return 10
+ dbc_set_dbtype_defaults
+ _dbc_debug dbc_set_dbtype_defaults() 
+ [  ]
+ [  ]
+ dbc_default_basepath=
+ dbc_db_installed_cmd=dbc__db_installed
+ dbc_register_templates=database-type dbconfig-install dbconfig-upgrade dbconfig-remove dbconfig-reinstall password-confirm app-password-confirm purge upgrade-backup passwords-do-not-match install-error upgrade-error remove-error internal/reconfiguring internal/skip-preseed missing-db-package-error mysql/method remote/host remote/newhost mysql/app-pass mysql/admin-user mysql/admin-pass remote/port db/dbname db/app-user pgsql/method remote/host remote/newhost pgsql/app-pass pgsql/admin-user pgsql/admin-pass remote/port pgsql/authmethod-admin pgsql/authmethod-user pgsql/changeconf pgsql/manualconf db/dbname db/app-user pgsql/no-empty-passwords db/dbname db/basepath
+ [  ]
+ db_get postfix-cluebringer/dbconfig-install
+ _db_cmd GET postfix-cluebringer/dbconfig-install
+ IFS=  printf %s\n GET postfix-cluebringer/dbconfig-install
+ IFS=
 read -r _db_internal_line
+ RET=10 postfix-cluebringer/dbconfig-install doesn't exist
+ return 10
+ db_get postfix-cluebringer/dbconfig-upgrade
+ _db_cmd GET postfix-cluebringer/dbconfig-upgrade
+ IFS=  printf %s\n GET postfix-cluebringer/dbconfig-upgrade
+ IFS=
 read -r _db_internal_line
+ RET=10 postfix-cluebringer/dbconfig-upgrade doesn't exist
+ return 10
+ db_get postfix-cluebringer/dbconfig-remove
+ _db_cmd GET postfix-cluebringer/dbconfig-remove
+ IFS=  printf %s\n GET postfix-cluebringer/dbconfig-remove
+ IFS=
 read -r _db_internal_line
+ RET=10 postfix-cluebringer/dbconfig-remove doesn't exist
+ return 10
+ [  != true ]
+ return 0
+ dbc_write_package_config
+ local iformat ofile tfile
+ _dbc_debug dbc_write_package_config() 
+ [  ]
+ _dbc_sanity_check packageconfig
+ [ 1 -ne 0 ]
+ [ -z /etc/dbconfig-common/postfix-cluebringer.conf ]
+ shift
+ [ 0 -ne 0 ]
+ echo dbconfig-common: writing config to /etc/dbconfig-common/postfix-cluebringer.conf
dbconfig-common: writing config to /etc/dbconfig-common/postfix-cluebringer.conf
+ dbc_mktemp dbconfig-package-config.XXXXXX
+ local tfile ttemplate
+ [ dbconfig-package-config.XXXXXX ]
+ ttemplate=dbconfig-package-config.XXXXXX
+ mktemp -t dbconfig-package-config.XXXXXX
+ tfile=/tmp/dbconfig-package-config.GB4ICq
+ [ ! -f /tmp/dbconfig-package-config.GB4ICq ]
+ echo /tmp/dbconfig-package-config.GB4ICq
+ tfile=/tmp/dbconfig-package-config.GB4ICq
+ [  ]
+ [  = tcp/ip + ssl ]
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ dbc_sq_escape
+ sed -e s,','\\'',g
+ cat
+ dirname /etc/dbconfig-common/postfix-cluebringer.conf
+ mkdir -p /etc/dbconfig-common
+ ucf --debconf-ok /tmp/dbconfig-package-config.GB4ICq /etc/dbconfig-common/postfix-cluebringer.conf

Creating config file /etc/dbconfig-common/postfix-cluebringer.conf with new version
+ ucfr postfix-cluebringer /etc/dbconfig-common/postfix-cluebringer.conf
+ rm -f /tmp/dbconfig-package-config.GB4ICq
+ [  != true ]
+ [ true != true ]
+ [ template:/etc/cluebringer/cluebringer.conf ]
+ [ root:www-data ]
+ dbc_generate_include_args=-o template_infile=/usr/share/doc/postfix-cluebringer/templates/cluebringer.conf -U -O root:www-data
+ [ 660 ]
+ dbc_generate_include_args=-o template_infile=/usr/share/doc/postfix-cluebringer/templates/cluebringer.conf -U -O root:www-data -m 660
+ echo template:/etc/cluebringer/cluebringer.conf
+ grep -q -E ^[^:]*:
+ echo template:/etc/cluebringer/cluebringer.conf
+ cut -d: -f1
+ iformat=template
+ echo template:/etc/cluebringer/cluebringer.conf
+ cut -d: -f2
+ ofile=/etc/cluebringer/cluebringer.conf
+ dbconfig-generate-include -a -f template -o template_infile=/usr/share/doc/postfix-cluebringer/templates/cluebringer.conf -U -O root:www-data -m 660 -U /etc/dbconfig-common/postfix-cluebringer.conf /etc/cluebringer/cluebringer.conf
Not replacing deleted config file /etc/cluebringer/cluebringer.conf
chown: cannot access `/etc/cluebringer/cluebringer.conf': No such file or directory
chmod: cannot access `/etc/cluebringer/cluebringer.conf': No such file or directory
+ ucfr postfix-cluebringer /etc/dbconfig-common/postfix-cluebringer.conf
+ dbc_read_package_config
+ _dbc_debug dbc_read_package_config() 
+ [  ]
+ _dbc_sanity_check package packageconfig
+ [ 2 -ne 0 ]
+ [ -z postfix-cluebringer ]
+ shift
+ [ 1 -ne 0 ]
+ [ -z /etc/dbconfig-common/postfix-cluebringer.conf ]
+ shift
+ [ 0 -ne 0 ]
+ dbc_install=true
+ dbc_upgrade=true
+ [ -f /etc/dbconfig-common/postfix-cluebringer.conf ]
+ . /etc/dbconfig-common/postfix-cluebringer.conf
+ dbc_install=
+ dbc_upgrade=
+ dbc_remove=
+ dbc_dbtype=
+ dbc_dbuser=
+ dbc_dbpass=
+ dbc_dbserver=
+ dbc_dbport=
+ dbc_dbname=
+ dbc_dbadmin=
+ dbc_basepath=
+ dbc_ssl=
+ dbc_authmethod_admin=
+ dbc_authmethod_user=
+ [ -z  ]
+ dbc_dballow=localhost
+ [  != true ]
+ return 0
+ update-rc.d postfix-cluebringer defaults
insserv: warning: current stop runlevel(s) (0 1 6) of script `ntp' overwrites defaults (empty).
insserv: warning: script 'iptables-rules.sh' missing LSB tags and overrides
+ [ -f /etc/cluebringer/cluebringer.conf ]
+ echo Config file /etc/cluebringer/cluebringer.conf not found. Not attemting start of service.
Config file /etc/cluebringer/cluebringer.conf not found. Not attemting start of service.
+ exit 0

Attachment: postfix-cluebringer.postinst
Description: application/shellscript

Attachment: postfix-cluebringer.postrm
Description: application/shellscript

Attachment: postfix-cluebringer.preinst
Description: application/shellscript

Attachment: postfix-cluebringer.prerm
Description: application/shellscript

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: