On 6/19/2012 10:12 AM, Dietmar Maurer wrote: >> At boot rgmanager starts fine, without cpglockd running. >> I think the problem here is the interpretation of the LSB specifications >> between different distributions. I am not going to argue which one is right >> or >> wrong but the key issue is here: >> >> "An init.d shell script may declare using the "Required-Start: " header that >> it >> shall not be run until certain boot facilities are provided. >> This information is used by the installation tool or the boot-time >> boot-script >> execution facility to assure that init scripts are run in the correct order." >> >> In the fedora world that means that if cpglockd is enabled (via chkconfig), >> the >> Required-Start: make sure that cpglockd is started before rgmanager, always. >> >> It is possible that other distributions might interpret that as: >> "cpglockd must be started even if disabled" when rgmanager >> Required-Start: cpglockd and rgmanager is enabled. >> >> So based on the platform I use for testing/development, the daemon does >> not start unless it is necessary :) > > OK, I was not aware of that. > > Many thanks for that detailed reply!
So let´s instead try to figure out the correct fix. Let´s put one minute aside the possibility that some distributions might use the second interpretation of LSB header and focus only on the ordering instead. Dropping Required-Start: might look like an easy fix in the Debian world, but that could cripple the startup order as cpglockd could theoretically land after rgmanager (i don´t think it´s possible, but let´s not take a chance). I think the correct fix should be: move the conditional start start_cpglockd function/check from rgmanager.init to cpglockd.init. move the "cpglockd is up and running" test from rgmanager.init to cpglockd.init (that´s a bug as-is now). cpglockd.init should return 0 (success) if it does not need to run and would allow rgmanager to start given Debian current interpretation of LSB header. rgmanager.init can simply fire cpglockd.init without any check, as those would be done properly by cpglockd.init. I think this should solve the issue for Debian and keep current behavior in Fedora. Fabio