Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230501 - dev-db/mysql-init-scripts: add features from debian-start
Summary: dev-db/mysql-init-scripts: add features from debian-start
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-02 11:44 UTC by Evert Meulie
Modified: 2011-01-25 02:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
debian-start (debian-start,1.17 KB, text/plain)
2008-07-02 11:47 UTC, Evert Meulie
Details
the include used by debian-start (debian-start.inc.sh,2.26 KB, text/plain)
2008-07-02 11:47 UTC, Evert Meulie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evert Meulie 2008-07-02 11:44:34 UTC
On a Ubuntu system I came across /etc/mysql/debian-start in their MySQL server start/stop script.
This script carries out a bunch of sanity checks right after starting the MySQL server. Let's adapt this script and implement it on Gentoo as well!

Reproducible: Always
Comment 1 Evert Meulie 2008-07-02 11:47:13 UTC
Created attachment 159307 [details]
debian-start
Comment 2 Evert Meulie 2008-07-02 11:47:42 UTC
Created attachment 159309 [details]
the include used by debian-start
Comment 3 Francesco Riosa 2008-07-02 16:53:02 UTC
IMHO force these test on every restart is not so good as it seem.
The Solution [tm] would be to add {pre,post} hooks to {start,stop} phases and maybe document some example on how to achieve automatic testing/repairing of tables, permissioons, whatever.

However this should be a change in baselayout or openrc, not mysql init scripts.
Comment 4 Roy Marples 2008-07-09 12:31:26 UTC
OpenRC already supports pre_$command
where $command is start,stop, status, custom_command, etc

(just idly browsing bugzilla here)
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-06 01:15:06 UTC
1. See the new mysql init scripts in bug 175783.
2. I don't find Roy's mentioned pre_ ability in the openrc generic codebase. It's in the net.* stuff as shell code only.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-13 20:02:09 UTC
This would also require that a valid root login for MySQL is somewhere in the filesystem (debian stores a copy for it's admin use).

Respin against the new mysql-init-scripts-2.0_pre1 please
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-25 02:52:27 UTC
Please reopen when you respin.