[debian-mysql] Bug#739846: Bug#739846: invoke-rc.d: initscript mysql, action "start" failed.

Robie Basak robie.basak at ubuntu.com
Tue Jun 30 09:37:13 UTC 2015


On Tue, Jun 30, 2015 at 02:35:42AM -0600, Bob Proulx wrote:
> If /etc/mysql/debian-start outputs something, anything, then the test
> for -n "$output" is true and then log_action_msg logs it and also
> returns 0.  But if /etc/mysql/debian-start emits nothing then output
> is empty and -n "" is non-zero.  At that point things fall through to
> the bottom of the script and exits with the last exit code which means
> the script exits non-zero as well.  Because the action exits non-zero
> the postinst script fails and dpkg --configure fails.
> 
> Would it be possible to put an exit 0 at the bottom of the script?  It
> would be good programming.  I think it is definitely unintended to
> exit non-zero when /etc/mysql/debian-start doesn't print anything.
> Note that the /etc/init.d/skeleton previously included a ":" at the
> bottom to essentially do the same thing in a different way.  I think
> ending with a ":" to be more obscure than the more explicit exit 0 and
> therefore prefer the latter.  But either would be the same.  All of
> the error handling in the script explicitly exits with a non-zero
> error upon detecting an error.

What if /etc/mysql/debian-start fails? Should we be checking the result
code of this and exiting with the same status? Or should we be ignoring
the result of /etc/mysql/debian-start (as I think we are now) and
returning 0 in all cases, as the daemon itself has started?

Although if we fail when /etc/mysql/debian-start fails, the daemon would
already have been started even though we're returning failure which
could be confusing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20150630/8f70260f/attachment.sig>


More information about the pkg-mysql-maint mailing list