Comment 3 for bug 1575572

Revision history for this message
Scott Moser (smoser) wrote :

Ok, here is what is happening:
 a.) dpkg (or apt) install of apache2 (or just about any service) starts services by calling to /usr/sbin/invoke-rc.d (like 'invoke-rc.d apache2 start').
 b.) invoke-rc.d calls 'runlevel' to get the current runlevel and see if this service should be started.
 c.) runlevel during systemd boot writes 'unknown' (single token rather than previous and current runlevel) and exits 1
       the test for failure of RUNLEVELHELPER is bogus in at least 2 ways ('test ! $?' will return 0 for 0 or 1, and additionally it actually only checks the return code of 'sed' which is going to be 0 anyway as sed did its job).
 d.) output of runlevel is stored in RL and then it goes looking for an SLINK or SSLINK (/etc/rc$RL.d/S??apache2 or /etc/rcS.d/S??apache2). Neither of these exist so it exits without starting the service.

The problem seems to be that any package install during systemd boot of a package that only provides sysvinit scripts will fail.
Reading invoke-rc.d, i'm not really sure why a proper systemd service woudlnt fail also.