Hi, I might have found a bug in the dependency calculation part of openrc. It seems like in some situations openrc ignores the rc_before and rc_after settings: I have xdm init script with rc_need="consolekit" and it's added to default runlevel. I have virtualbox-guest-additions with rc_before="xdm" and rc_after="consolekit" and also added to the default runlevel. I have consolekit with rc_before="virtualbox-guest-additions" but it's _not_ added to any runlevel but gets pulled into the dependency graph by rc_need from xdm. virtualbox-guest-additions still gets started before consolekit which breaks startup of consolekit daemon. As you might have guessed already this happens in a Gentoo VM inside of a VirtualBox host. The problem is, that the virtualbox-guest-additions init script starts vboxguest-service which (since virtualbox-4.2.6) starts consolekit and polkit daemons if not being invoked with the --disable-vminfo switch. Of course I could fix this imediately by adding consolekit init script to the default runlevel but IMHO openrc should be able to solve this anyway because it has all the necessary information to get the dependency order right.
There's no bug there Poynomial-C, it's expect. Have a look: https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscripts When using before, then the given script is launched before the selected one <if the selected one is part of the init level>. So an init script xdm that defines before alsasound will start before the alsasound script, but <only if alsasound is scheduled to start as well in the same init level>. <If alsasound is not scheduled to start too, then this particular setting has no effect> and xdm will be started when the init system deems it most appropriate. Similarly, after informs ...<if the selected one is part of the init level>. <If not, then the setting has no effect> and the script will be launched by the init system when it deems it most appropriate. So without them sharing same level (your consolekit share none as it is not in any runlevels), both keywords do nothing. While i understand the concern it "should" maybe do like you said, still "it's not a bug, but a feature" (c)Bill Gates :) On the other end, while i myself could enjoy such feature, seeing how portage is resolving deps itself, i just prefer openrc keeping this "simple" scheme and not going into a deps hell calculation when starting an init script ; KISS
I think `nobody` is correct. Lars, if you add consolekit to the run level, the services will start in the right order. Otherwise, replace "after" with "need".
Since there has been no more activity on this bug, I am closing it and agreeing with @heroxdb. If this change in behaviour is important to you, please feel free to submit a patch. Thanks, William
So you're going the easy way by ignoring useful feature requests. Good to know...