| Summary: | baselayout-1.12.0-pre3-r2 reports error while loading mysql; tough mysql works fine | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Nicolas Schlumberger <n.schlumberger> |
| Component: | [OLD] baselayout | Assignee: | Roy Marples (RETIRED) <uberlord> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gurligebis, matrixhax0r |
| Priority: | High | Keywords: | InVCS |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
patch to initscript
patch to initscript patch to /etc/init.d/mysql patch for /lib/rcscripts/sh/rc-daemon.sh |
||
|
Description
Nicolas Schlumberger
2005-08-01 04:36:13 UTC
I messed a with the mysql init-script, and got it running somehow. Fact is I
don't whether what I've done is correct and should be done that way.
/etc/init.d/mysql
...
start() {
local retstatus=1
local maxtry=5
getconfig
checkconfig || return 1
ebegin "Starting mysqld (${MY_CNF})"
start-stop-daemon --start --quiet --background \
--exec "${basedir}/bin/mysqld_safe" \
-- --defaults-file=${MY_CNF} >/dev/null 2>&1
retstatus=$?
while ! [[ -S "${socket}" || "${maxtry}" -lt "1" || "${retstatus}" -gt
"0" ]] ; do
maxtry=$(($maxtry-1))
echo -n "."
sleep 1
done
! [[ -S "${socket}" ]] && eerror "MySQL NOT started, proceding anyway"
if [[ $retstatus < 5 ]]; then
eend
fi
}
...
Cheers
Nicolas
PS. I hope base-system@gentoo.org is the right place for the bug, please
reassign if not
Sorry, I entered the wrong if-condidtion.... It should be if [[ $retstatus == 0 ]]; then Or I have not really understood what I was doing.... Cheers Nicolas Where do I have my mind?? I forgot to mention that I use mysql-4.0.25-r2 Nicolas It would be better if you posted a patch to the init script Created attachment 64866 [details, diff]
patch to initscript
Patch as requested
It's my first one, so no garanties
Cheers
Nicolas
PS. Isn't anybody else experiencing this problem... I hoped for a comfirmation
Created attachment 64867 [details, diff]
patch to initscript
Patch as requested
It's my first one, so no garanties
Cheers
Nicolas
Comment on attachment 64867 [details, diff]
patch to initscript
patch is wrong, find out why start-stop-daemon returned a non-0 value
Created attachment 64868 [details, diff]
patch to /etc/init.d/mysql
retstatus=$? cannot get the new value in time. added sleep 1 before; script
works again
Cheers
Nicolas
Comment on attachment 64868 [details, diff]
patch to /etc/init.d/mysql
no, in this case you're setting retstatus to the result of the 'sleep' call
try removing the '--quiet' option from the start-stop-daemon call
Thx for the fast reply... I removed --quiet, but the output didn't change. ------- Kor ~ # killall mysqld Kor ~ # /etc/init.d/mysql restart * Starting mysqld (/etc/mysql/my.cnf) ... [ !! ] Kor ~ # killall mysqld Kor ~ # /etc/init.d/mysql start * Starting mysqld (/etc/mysql/my.cnf) ... [ !! ] Kor ~ # ------- And for some reason, the $retstatus gets set to 1 - which means that there is an error. I ran the respective part directly from console and there it worked. Well, I replaced all variables, and I know that those are set correctly! # start-stop-daemon --start --background --exec "/usr/bin/mysqld_safe" -- --defaults-file=/etc/mysql/my.cnf >/dev/null 2>&1 && echo $? 0 I am getting a bit frustrated, 'cause I think that I am running in circles Cheers Nicolas try adding -v to the start-stop-daemon command Created attachment 64877 [details, diff] patch for /lib/rcscripts/sh/rc-daemon.sh I searched the forums, and found this: http://forums.gentoo.org/viewtopic-t-362461-highlight-baselayout+mysql.html It mostly explains the problem, and how to solve it. I created a patch for the specific file, which belong to baselayout I hope that solves the problem Cheers Nicolas Fixed in our svn repo Like you wanted... confirmed over here. Err, btw, extremely off-topic, has anyone had urandom pause for about a minute at boot? see #101123 does this solve netmounts too? Fixed in baselayout-1.12.0_pre4 |