Felipe Sateler: > [...] > > I think the entanglement can be removed by runtime checking of the unit. > > 1. Swap the order of installinit and installsystemd so systemd acts first.
(Moved related argument up) > Step one is needed in case the compatibility symlink is created at > systemd-enable time (via Alias) > Just to confirm, we just need "d-s-h enable <service>" from dh_installsystemd to run before the snippet below for the same service, correct? If so, then we have an alternative method for handling that besides re-ordering the helpers. That would have the advantage of also working if people call dh_installinit and dh_installsystemd in a different order than we expect. > 2. Have the installinit snippet do: > > if [ -d /run/systemd/system ] && [ "/etc/init.d/#SCRIPT" != "$(systemctl > show --value --property SourcePath #SCRIPT#.service)" ] ; then > # do nothing > else > invoke-rc.d #SCRIPT# start || #ERROR_HANDLER# > fi > > This checking could also be moved into invoke-rc.d via some flag. What do > you think? > I think it would be best if that logic was handled by invoke-rc.d. In case that logic need to be updated for some reason, then it is a lot easier to just update update-rc.d than thousands of maintscripts. Can you handle the update-rc.d side or should I file a bug against init-system-helpers? Thanks, ~Niels