Postinsts barfing when mysqld not running
Barry deFreese
bddebian at comcast.net
Mon Aug 20 17:48:39 BST 2007
Michael Bienia wrote:
> On 2007-08-17 16:50:27 -0400, Barry deFreese wrote:
>
>> For simba, I did something like this in the simba.postinst:
>>
>> # Check if mysqlserver is running
>> if [ -e "/var/run/mysqld/mysqld.sock" ]; then
>> ...
>> else
>> echo "W: Database server does not appear to be running!"
>> echo "W: Please try dpkg-reconfigure simba to configure the package."
>> fi
>>
>
> This check will fail if the database server runs on an other host.
>
>
Obviously but it fails that currently as far as I can see.
>> Should I tell them to install a database server and make sure it's
>> running, then reconfigure the package. Or am I approaching this the
>> wrong way entirely?
>>
>
> It's a valid configuration to have the database on an other host.
> Therefore similar packages like simba depend only on a database client
> (which will hopefully know where to reach the database) and suggest the
> database server at best.
>
>
Right, again, poor choice of words. I mean install a database server
"somehwere". I suppose it should be more descriptive that either
connect to remote database or install local database.
What I was really looking for though was if this was even the correct
approach to get around these issues.
I suppose another option would be to prompt the user for 1. Connect to
remote db 2. Use local db 3. Leave unconfigured but that just means
more prompting that we don't like, no?
> Michael
>
>
Thanks for responding, at least someone is.. :)
Barry deFreese (aka bddebian)
More information about the Ubuntu-motu
mailing list