Created attachment 392562 [details, diff] Patch that fixes the issue. The init script of fcron has a function with a broken `sed` call that always returns emptrystring. For the case of trying to get `pidfile` with that function, `runscript` decides that this means that it doesn't have to supply `pidfile` to `start-stop-daemon`, which, when invoked again later, assumes that fcron is running via rc if it can find a matching process. The problem manifests itself in a chrooted environment where the host is already running fcron. How to reproduce: 1. # /etc/init.d/fcron start 2. # mount /dev/sdq5743 /mnt/chroot # mount -t proc none /mnt/chroot # mount --rbind /sys /mnt/chroot/sys # mount --rbind /dev /mnt/chroot/dev 3. # chroot /mnt/chroot /bin/zsh # /etc/init.d/fcron start * Setting system clock using the hardware clock [UTC] ... [ ok ] * Setting hostname to contest ... [ ok ] * Starting fcron ... * start-stop-daemon: /usr/libexec/fcron is already running * Failed to start fcron [ !! ] * ERROR: fcron failed to start # /etc/init.d/fcron -d start ... ++ start-stop-daemon --start --exec /usr/libexec/fcron -- -c /etc/fcron/fcron.conf # Oh no! ... The attached patch solves this issue by correcting the quotes in the `sed` command. It also adds other missing quotes, removes "-a" and "-o" from "[ .. ]" statements, corrects `getconfig()` to not assume that the presence of a config file indicates the presence of a variable inside it, drops an unnecessary `cat` invocation and turns `configfile()` into a variable so that it does not need to be calculated every time we need it.
Thanks for the report and the provided patch! I merged a different runscript however some changes are based on your idea: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=531e27c45e1f413da44d8a51ece0f59e454586fb