It seem that it's missing /etc/conf.d/mysql in mysql-4.24-r1 : /etc/init.d/mysql : <snip> getconfig() { MY_NAME="(`basename $1`)" ... MY_CNF=${MY_CNF=/etc/mysql/my.cnf} </snip <snip> start() { getconfig </snip> So it make getconfig failed. MY_CNF can't init before with no conf.d/mysql and getconfig is called without arguments so basename failed : ^^ ROOT ^^ /etc # /etc/init.d/mysql start (guybrush) 13/03 16:50:50 * Caching service dependencies ... [ ok ]basename: Trop peu de arguments. Pour en savoir davantage, faites:
It seem that it's missing /etc/conf.d/mysql in mysql-4.24-r1 : /etc/init.d/mysql : <snip> getconfig() { MY_NAME="(`basename $1`)" ... MY_CNF=${MY_CNF=/etc/mysql/my.cnf} </snip <snip> start() { getconfig </snip> So it make getconfig failed. MY_CNF can't init before with no conf.d/mysql and getconfig is called without arguments so basename failed : ^^ ROOT ^^ /etc # /etc/init.d/mysql start (guybrush) 13/03 16:50:50 * Caching service dependencies ... [ ok ]basename: Trop peu de arguments. Pour en savoir davantage, faites: « basename --help ». basename: Trop peu de arguments. Pour en savoir davantage, faites: « basename --help ». Why start call getconfig and then configcheck ? configcheck call getconfig also checkconfig make a check on $datadir witch is never initialized. I think it's $dir (dir=`echo "${mysqld_cnf}" | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`) Reproducible: Always Steps to Reproduce: 1./etc/init.d/mysql 2. 3. Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5-20050130, glibc-2.3.4.20050125-r0, 2.6.11-gentoo-r3 i686) ================================================================= System uname: 2.6.11-gentoo-r3 i686 AMD Athlon(TM) XP 2000+ Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Feb 21 2005, 21:01:58)] distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r6 sys-devel/libtool: 1.5.10-r5 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig candy ccache distlocks fixpackages sandbox sfperms test" GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.inode.at/ http://gentoo.math.bme.hu http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://ftp.rhnet.is/pub/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.heanet.ie/pub/gentoo/" LANG="fr_FR@euro" LC_ALL="fr_FR@euro" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/perso /usr/local/portage/others /usr/local/portage/zugaina" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex X acl acpi alsa apache2 apm arts avi berkdb bitmap-fonts cairo cddb cdr crypt cscope curl dvd emboss encode ethereal fam font-server foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 imagemagick imap imlib java jpeg junit kde lcms ldap libg++ libwww maildir memlimit mmx mmx2 mozilla mp3 mpeg msn mysql ncurses nls ntpl nvidia oggvorbis opengl pam pdflib perl png ppds python qt quicktime readline sdl slang snmp spell sse ssl tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb videos xml xml2 xmms xsl xv zlib linguas_fr" Unset: ASFLAGS, CBUILD, CTARGET, LDFLAGS
Created attachment 53341 [details, diff] /etc/init.d/mysql fast patch (have to be changed) Very Very fast change Not clean
this init-script is crap at all. There're many more Bug in it! getconfig() { MY_NAME="(`basename $1`)" throws errors, because $1 is empty dir=`echo "${mysqld_cnf}" | sed -ne '/datadir/s|^--datadir=||p' | tail -n1` [..] export MY_NAME MY_CNF pid_file datadir 'datadir' is NEVER set anywhere, but 'dir'. and then: start() { getconfig checkconfig || return 1 but: checkconfig() { getconfig furthermore: start-stop-daemon: --start needs --exec or --startas Try `start-stop-daemon --help' for more information. [ !! ] that's BS at all! This init-script was never tested. It's just crap!
start-stop-daemon: unrecognized option `--defaults-file=/etc/mysql/my.cnf' Try `start-stop-daemon --help' for more information. [ !! ] the '--' must before the --defaults-file. I have to repeat myself: this init-script is a piece of BS. There's not one stupid, easy to fix, little Bug. This would be no problem at all. But this init-script has so many Bugs in it, I ask myself why it is in Portage?
sorry guys. I copied the wrong version into my overlay and commited that. your patch is totally off the mark as well. The correct version is in the tree now, so just copy it straight over your existing copy: cp /usr/portage/dev-db/mysql/files/mysql-4.0.24-r1.rc6 /etc/init.d/mysql chmod +x /etc/init.d/mysql A conf.d script is entirely optional, it's just MY_CNF written that way for later on when we go to supporting mysqld_multi in the init scripts.
*** Bug 85125 has been marked as a duplicate of this bug. ***
*** Bug 89974 has been marked as a duplicate of this bug. ***