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

Re: Using debconf to notify of serious postinst problems



On Fri, Mar 23, 2007 at 01:42:30PM +0000, Colin Turner wrote:
> 
> 2. Using debconf to notify in postinst
> 
> Part of the install is to create a database with given credentials and
> import a schema. I have debconf prompting for values and I'm
> successfully using these in the postinst script.
> 
> My problem/worry is this. I am asking for the root MySQL password - if
> it is known - and letting the user know I'll purge this value straight
> after database creation and so on.
> 
Hi.  I'm not sure of the details of your software (I've not looked at
it), but I will offer my recommendation as to the database issue.

Consider that installation may happen unattended.  If so, how will the
admin be prompted?  I am not up to speed on my debconf-fu.  However, I
would recommend that you differentiate between an interactive and a
non-interactive installation.  In either case, you should include a
script in some place like /usr/share/doc/opus/scripts (or something like
that) called schema.mysql (or just .sql if it is generic enough to work
on other servers).

You may also want to consider adding a /etc/defaults/opus with an
"ENABLED=YES|NO" sort of option and have the startup or init script
check that.  Then if the install is unattended, the admin has to go in
later, create the databases and set the ENABLED variable in the defaults
file.

Regards,

-Roberto

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

Attachment: signature.asc
Description: Digital signature


Reply to: