If you enable the nice=value in /etc/conf.d/mysql, then the init script complains about unrecognized option --nicelevel: nautilus / # /etc/init.d/mysql restart * Caching service dependencies ... [ ok ] * ... * working on mysql_slot_0 * Starting mysqld0 (/etc/mysql/my.cnf) /sbin/start-stop-daemon: unrecognized option `--nicelevel -15' Try `/sbin/start-stop-daemon --help' for more information. * MySQL NOT started (3) [ !! ] nautilus / # The problem is this line in /etc/init.d/mysql: ${NICE:+"--nicelevel "}${NICE} \ To get the nicelevel stuff working, this line should be: ${NICE:+"--nicelevel="}${NICE} \ After adding the = after the --nicelevel parameter, the init script does start mysql with the specified nice level from /etc/conf.d/mysql. cheers SteveB
@ steveb, please provide also the output from "/sbin/start-stop-daemon --version" @ base-system here it work with "start-stop-daemon 1.13.11+gentoo" from sys-apps/baselayout-1.12.0_pre15 fex, running it as user it _correctly_ return an error that cannot renice: #/sbin/start-stop-daemon --nicelevel -15 --start --exec /bin/ls /sbin/start-stop-daemon: Unable to alter nice level by -15: Permission denied (Permission denied)
(In reply to comment #1) > @ steveb, please provide also the output from "/sbin/start-stop-daemon > --version" > start-stop-daemon 1.13.11+gentoo The problem is, that if you run the command in bash, then it works. If you run the exactly same command in the init script then it does NOT work. Try it. You will see, that there is a difference if you run it from script and runing it from bash.
Created attachment 80095 [details, diff] fix_init_d_nice_bug123132.patch Since I cannot understund the bug (but it's reproducible), here is a workaround, apply with: patch -i fix_init_d_nice_bug123132.patch /etc/init.d/mysql
Patch in c#3 things work here, if it's not the same for you please reopen the bug. The same workaround will be committed in the cvs tree. Thanks Steveb to pointing this out, and the different behaviour under baselayout and the normal user environment.
baah, I could rephrase that awfull english if needed, but before try to understud it anyway also that way. Also forget to comment on why the road of "--nicelevel=-15" has not been followed: This way to specify options is undocumented, and the behaviour under the wide range of baselayouts installed may be different and break things again. So sticky to "--nicelevel -15" for now.
Looks like it's because you're passing "--nicelevel -15" as one option because it's quoted, so your patch is correct. This is not a baselayout bug.