Bug#757767: debian-edu-config: systemd + fetch-ldap-cert causes boot to hang
When booting Debian Edu in Jessie, systemd is enabled. This causes the
boot to hang. I've so far tested using a Minimal profile, and this hang
when init.d/networking try to bring up the DHCP network because our
fetch-ldap-cert dhclient hook try to call the init.dfetch-ldap-cert
script, which depend on $network (aka init.d/networking) and thus end up
with a dependency loop. With systemd, this causes a deadlock and the
The issue is also reported as bug #754218 against systemd. CC to that
bug to make the systemd maintainers aware of this instance of the
problem, as the only example so far in that bug report are scripts
outside packages from Debian.
A workaround or fix (depending on your view) is to change the
fetch-ldap-cert exit hook to detect systemd and not try to call the
init.d/fetch-ldap-cert script when called from init.d/networking. The
init.d/fetch-ldap-cert script will be called later in the boot anyway
when the network is available, so this should be safe to do.
The following tested patch solve the hanging boot problem for the
Minimal profile installation.
--- fetch-ldap-cert (revision 83364)
+++ fetch-ldap-cert (working copy)
@@ -10,6 +10,12 @@
+# Avoid dependency loop by not calling init.d script when dhclient is
+# called by init.d/networking. Workaround for BTS issue #754218.
+if [ -d /run/systemd/system ]; then
+ systemctl list-jobs | grep -q network.target && exit 0
case $reason in
I do expect other packages to have similar problems, so we will probably
discover more of these when testing the Main-Server profile.