There seems to be a minor issue with start-stop-daemon when using -r/--chroot. start-stop-daemon checks for binary presence before chrooting, so while doing: # start-stop-daemon --start --exec /usr/bin/amuled -r /chroot/amule/ I MUST have /usr/bin/amuled, otherwise start-stop-daemon will fail even before calling chroot(). A simple workaround is to keep a copy of the binary outside the chroot in its original path. Anyway a guy on debian ML posted a small patch, please consider merging it if this bug is confirmed. Happy holidays to everyone! :)
Created attachment 65309 [details, diff] This is a small fix posted on debian ML
Created attachment 65336 [details, diff] Env + Chroot patch I just did this small patch: 1. Fixes the chroot stat() bug, now files are correctly stat()ed even when -r is used. 2. Added -e | --env for setting an environment variable. When a process is going to be chrooted is not possible to export a variable with start-stop-daemon, with -e the variable is exported in new root (if -r is used) and anyway you won't have to prepend VAR="value" start-stop-daemon... Before starting a daemon. 3. Moved --make-pidfile routine, manual said that pidfile was written AFTER chrooting the process, but in fact, it wasn't. Now make-pidfile behaves like stated in the manual 4. Added -e to the man page and -e|-r to help screen. Have a nice day. Que
Patch accepted - will be in baselayout-1.12.0_pre9 Thanks!
Fixed in pre10