]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
daemon: don't fork at all when using upstart fix/upstart-stop 248/head
authorVincent Bernat <vincent@bernat.im>
Mon, 2 Oct 2017 19:52:33 +0000 (21:52 +0200)
committerVincent Bernat <vincent@bernat.im>
Mon, 2 Oct 2017 19:58:27 +0000 (21:58 +0200)
It seems there is a bug in Upstart state machine. If the process fail
before daemonizing, Upstart says the process will be respawned but that's
not the case. Moreover, Upstart has difficulty to correctly track
daemonization of lldpd (it is confused by the additional process
spawning after initial daemonization, for some reason?).

Fix #245 (for real)

debian/lldpd.upstart

index 9de68e06a6b4528add4a9ac6f15783beaeef1782..1f1421b0439b782dcec1a8828210a55593bcd84a 100644 (file)
@@ -9,10 +9,9 @@ description "LLDP daemon"
 start on net-device-up IFACE=lo
 stop on runlevel [06]
 
-expect daemon
 respawn
 
 script
   . /etc/default/lldpd
-  exec lldpd $DAEMON_ARGS
+  exec lldpd -d $DAEMON_ARGS
 end script