Source: dictd
Version: 1.12.1+dfsg-4
Severity: important
Tags: patch

Hi,

After updating the machine my local network dictd server runs on to
Stretch, it was 'silently' failing to start successfully at boot time.

The reason for this is a missing dependency on $network in the LSB
headers of the init script.  The systemd generator on Stretch does not
assume $remote_fs implicitly requires network configuration if there
are not actually any remote mounts needing it.

As-is it generates the following ordering constraints:

 After=basic.target sysinit.target system.slice systemd-journald.socket 
remote-fs.target

Which in practice starts dictd very early, before the network is up,
and so with a configuration like:

 global {
 listen_to 127.0.0.1
 listen_to 10.10.10.10
 }

dictd fails to start (reporting no error, but presumably because it could
not bind to an address that was not yet configured).


With the following patch, the generated ordering constraints are instead:

 After=systemd-journald.socket remote-fs.target network-online.target 
system.slice basic.target sysinit.target

which delays it starting until after the initial network configuration
is performed, and then everything works as expected.

  Cheers,
  Ron


diff --git a/debian/dictd.init b/debian/dictd.init
index fd9ae2b..65592a6 100644
--- a/debian/dictd.init
+++ b/debian/dictd.init
@@ -2,8 +2,8 @@
 # vim:ts=4:et:sts=4
 ### BEGIN INIT INFO
 # Provides:          dictd
-# Required-Start:    $remote_fs $syslog
-# Required-Stop:     $remote_fs $syslog
+# Required-Start:    $network $remote_fs $syslog
+# Required-Stop:     $network $remote_fs $syslog
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: Start and stop dictionary server daemon

Reply via email to