If you compare the systemd unit files for Quagga to the OpenRC ones, you'll note that a number of required parameters are not actually being passed to zebra - namely the path to its configuration file and PID file. Additionally, the /run/quagga folder does not get chown'd to quagga:quagga so this also results in it failing to startup. As an example, the Zebra systemd unit file should have the ExecStart like so: ExecStart=/usr/sbin/zebra -d -f /etc/quagga/zebra.conf -i /run/quagga/zebra.pid
(In reply to Olipro from comment #0) > If you compare the systemd unit files for Quagga to the OpenRC ones, you'll > note that a number of required parameters are not actually being passed to > zebra - namely the path to its configuration file and PID file. As you can not run two zebra daemons on the same system, i omit them, defaults are used. > Additionally, the /run/quagga folder does not get chown'd to quagga:quagga > so this also results in it failing to startup. Can not reproduce this on my systemd system(i rebooted to make sure that /run/quagga, remaining in RAM, will vanish). Directory ownership are controlled by systemd tmpfiles. With next release i plan to remove support of /run/quagga management from initscripts too, as tmpfiles are also supported by OpenRC - no need to duplicate the code. Closing as WORKSFORME. Reopen if issue still happens for you, but, please, attach actual logs with error messages.
I don't think you're making a valid test then. I don't see anywhere that makes quagga magically just "find" its config and pidfile, and indeed, if that were the case, why does OpenRC specify them? If your assertion is correct, please go ahead and delete the directives from the OpenRC init scripts and let's see what happens. As for the logs with error messages... they're the relatively obvious ones "unit failed to start" etc, which I resolved by doing what I originally said needed to be done (namely, passing the needed arguments to the daemon in the unit file)
As an addendum... maybe your systemd unit worked *by virtue* of you rebooting? is it possible for the files to fail if you emerge quagga and then immediately try to start the unit?
(In reply to Olipro from comment #2) > I don't think you're making a valid test then. I don't see anywhere that > makes quagga magically just "find" its config and pidfile, and indeed, if > that were the case, why does OpenRC specify them? Look at src_configure and in source code. Removing paths for pid file and config from OpenRC initscripts works for me as well. They were put there as an extra safety measure. >maybe your systemd unit worked *by virtue* of you rebooting? is it possible for the files to fail if you emerge quagga and then immediately try to start the unit? Nice catch, will try that
Your suggestion about PID directory was right. Commited with revbump(due to change of installed files) commit 2fe4a3a6e01fed2b08daeb8a16d6104ab03d2a41 Author: Sergey Popov <pinkbyte@gentoo.org> Date: Tue Aug 25 14:02:22 2015 +0300 net-misc/quagga: create directory for PID files during src_install Directory for PID files was not created during src_install, which makes impossible to use Quagga daemons before first reboot for systemd users Reported-by: Olipro <olipro+gentoopub@gmail.com> Gentoo-Bug: 558194 Package-Manager: portage-2.2.20