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

Bug 299130

Summary: dev-db/mysql-init-scripts-1.2 fail with /bin/sh -> /bin/zsh
Product: Gentoo Linux Reporter: archibald haddock <haddock>
Component: [OLD] ServerAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: paolo.pedroni
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://forums.gentoo.org/viewtopic-t-809110.html
Whiteboard:
Package list:
Runtime testing required: ---

Description archibald haddock 2009-12-31 16:27:15 UTC
With /bin/sh -> /bin/zsh /etc/init.d/mysql start does not work.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-db/mysql-init-scripts-1.2
2. ln -s /bin/zsh /bin/sh
3. /etc/init.d/mysql start

Actual Results:  
# /etc/init.d/mysql start 
* Caching service dependencies ... 
/etc/init.d/mysqlmanager:122: parse error near `()' [ ok ] 
start:5: bad substitution 
* ERROR: mysql failed to start 

Expected Results:  
Running well with zsh.
Comment 1 Dror Levin (RETIRED) gentoo-dev 2009-12-31 16:49:18 UTC
This also happens when using dash as /bin/sh:
# /etc/init.d/mysql status
/etc/init.d/mysql: 9: Syntax error: "(" unexpected

Seems like you shouldn't use "function name() {..." but just "name() {..." when defining functions.
Comment 2 Paolo Pedroni 2010-02-19 14:08:25 UTC
I have the same problem as in Comment #1, I have dash as sh and I can't start mysql anymore.

Please fix it, seen as the fix looks simple.
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2010-03-01 13:35:59 UTC

*** This bug has been marked as a duplicate of bug 175783 ***