sitebar postinst script doesn't work with Upstartified mysql-server

Bug #925162 reported by Nathan Stratton Treadway
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sitebar (Ubuntu)
New
Undecided
Unassigned

Bug Description

The current postinst script for the sitebar package attempts to get the PID file for the MySQL process and check to see if that process is running. This doesn't work with the current mysql-server package, which no longer users a PID file (since it has been Upstartified).

This mismatch causes the script to silently skip the creation of the Sitebar database and MySQL user, even when the user answers the debconf questions requesting that those actions be taken.

Tags: patch
description: updated
Revision history for this message
Nathan Stratton Treadway (nathanst) wrote :

Here's a patch to the Lucid postinst script that allowed the package to properly complete the MySQL configuration on my system.

Revision history for this message
Nathan Stratton Treadway (nathanst) wrote :

Note also that the lines of code in question are a little different in the Precise version of the package:

        if [ -f /usr/bin/mysqld_safe -a -f /etc/init.d/mysql ] ; then
            /etc/init.d/mysql status > /dev/null
            if [ $? = 0 ]; then

I don't have a Precise system on which I can do any testing, but I'm pretty sure this new logic will not work as expected in Ubuntu, since the "/etc/init.d/mysql status" call will be translated by the 'upstart-job' compatibility script to run "status mysql" -- but that command doesn't set the exit status in the way that the old init.d/mysql script does.

(At least "status mysql" doesn't set the exit status in Lucid, and I haven't yet found any sign that this has changed in Precise...)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch to Lucid sitebar.postinst script" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.