Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 230501

Summary: dev-db/mysql-init-scripts: add features from debian-start
Product: Gentoo Linux Reporter: Evert Meulie <evert>
Component: [OLD] ServerAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED NEEDINFO    
Severity: enhancement CC: roy
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: debian-start
the include used by debian-start

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.