The couchdb 0.9 initscript passes "--name beam" to start-stop-daemon, however if erlang was emerged with the smp use flag, beam's process name will actually be "beam.smp" and so using the initscript to start couchdb will fail.
(In reply to comment #0) > The couchdb 0.9 initscript passes "--name beam" to start-stop-daemon, however > if erlang was emerged with the smp use flag, beam's process name will actually > be "beam.smp" and so using the initscript to start couchdb will fail. > I can confirm this is an issue, and the proposed solution fixes it. I'll try and see if I can get the ebuild patched.
I'm happy to fix, but I don't know what the proposed fix is.
the initscript could replace references to the "beam" literal with the variable $BEAM, which it sets by asking equery for erlang's USE flags ("equery uses dev-lang/erlang"). it'd be nice if there were a way to ask equery about only the one particular USE flag we care about, but it doesn't look like there is. if not, something like this works: if [ `equery uses dev-lang/erlang | grep smp` = "+smp" ]; then BEAM="beam.smp" else BEAM="beam" fi
I've updated the 0.9 ebuild's conf.d and init.d scripts to handle this instance, I believe. Let me know if you see an issue, and reopen.
I've just emerged couchdb 0.9.0 and noticed line 11 of /etc/conf.d/couchdb: if [ -e /usr/lib*/erlang/erts-*/bin/beam.smp ]; then This is broken. Did you try it on the command line first? The double glob appears to be the culprit: ~ $ [ -e /usr/lib64/erlang/erts-*/bin/beam.smp ] ~ $ echo $? 0 ~ $ [ -e /usr/lib*/erlang/erts-*/bin/beam.smp ] -bash: [: /usr/lib/erlang/erts-5.7.1/bin/beam.smp: binary operator expected
I tested, but I guess not appropriately. I just committed a fix using sed instead.