| Summary: | Gentoo's emulation of start-stop-daemon does not handle --retry schedule | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Seth Robertson <in-gentoo> |
| Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | minor | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
It's fixed in baselayout-2 *** This bug has been marked as a duplicate of bug 155087 *** |
Gentoo emulates start-stop-daemon in /lib/rcscripts/sh/rc-daemon.sh This emulation lacks several features present and documented in /sbin/start-stop-daemon. --retry in schedule mode is the most important of these missing features (that I am aware of) but others like --verbose exist. Attempts to use this documented feature in a init.d script are silently translated to some completely different usage (--retry 5) Reproducible: Always Steps to Reproduce: 1. cat > /etc/init.d/example <<EOF #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 VMPID=/var/run/$SVCNAME.pid start() { ebegin "Starting ${SVCNAME}" start-stop-daemon --start -m -b --pidfile "${VMPID}" --exec /bin/sleep \ -- 300 eend $? "Check your logs to see why startup failed" } stop() { ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop -s 0 -R 1/-0/2/-KILL/15 --pidfile "${VMPID}" eend $? } EOF 2. chmod 755 /etc/init.d/example 3. /etc/init.d/example start 4. /etc/init.d/example stop Actual Results: * Stopping example ... [ !! ] Expected Results: * Stopping example ... /sbin/start-stop-daemon: warning: failed to kill 7913: No such process [ ok ] Passing the '-o' argument to start-stop-daemon causes the emulator to switch to the actual start-stop-daemon program which works as documented.