net-misc/zebedee-2.5.3 Executing '/etc/init/zebedee stop' does stop zebedee, but does not set it's state to stopped. Therefore trying to start it fails with: " * WARNING: zebedee has already been started." As a work around, after it is stopped you can execute '/etc/init/zebedee zap'. This manually resets the state so it may be started again. running it again appears to be successful, cannot start it since it Reproducible: Always Steps to Reproduce: with net-misc/zebedee-2.5.3 zebedee installed, execute the following: 1. /etc/init/zebedee start * Starting Zebedee ... 2. /etc/init.d/zebedee stop * Stopping Zebedee ... 3. /etc/init/zebedee start * WARNING: zebedee has already been started. Actual Results: Zebedee does not start after stopping it with /etc/init.d/zebedee stop Expected Results: Zebedee should start Work around is to call /etc/init.d/zebedee zap after stopping it: /etc/init.d/zebedee zap * Manually resetting zebedee to stopped state.
I don't know the finer points of the Gentoo init.d system architecture, but here is a possible fix. The current stop function in "/etc/init.d/zebedee" looks like this: stop() { ebegin "Stopping Zebedee" start-stop-daemon --quiet --stop --pidfile /var/run/zebedee.pid eend $? "Failed to stop Zebedee" # clean stale pidfile [ -f /var/run/zebedee.pid ] && rm -f /var/run/zebedee.pid } I compared this to other init.d files and noticed they don't "clean stale pidfile" in their stop functions. Commenting this line out seems to restore proper function. So the corrected function is: stop() { ebegin "Stopping Zebedee" start-stop-daemon --quiet --stop --pidfile /var/run/zebedee.pid eend $? "Failed to stop Zebedee" }
Also, the other init.d files don't have a "Failed to stop..." message in them either. Perhaps this is the way it should be done: stop() { ebegin "Stopping Zebedee" start-stop-daemon --quiet --stop --pidfile /var/run/zebedee.pid eend $? }
Looks good, fixed. For future reference: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4#doc_chap4 =)