]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
daemon: use RuntimeDirectory= instead of mkdir to create chroot
authorVincent Bernat <vincent@bernat.im>
Mon, 9 Apr 2018 10:53:33 +0000 (12:53 +0200)
committerVincent Bernat <vincent@bernat.im>
Mon, 9 Apr 2018 10:53:33 +0000 (12:53 +0200)
This fix a bug introduced in b0ca585f627aa where "mkdir -p" was
replaced by "mkdir" which would fail on restart due to the directory
already existing.

src/daemon/lldpd.service.in

index 6e1cff8ae0ba67309efe21817fab4effb03936bb..e054dd558396eed095f7dbeaa091858dfd1954cc 100644 (file)
@@ -9,7 +9,7 @@ Type=notify
 NotifyAccess=main
 EnvironmentFile=-/etc/default/lldpd
 EnvironmentFile=-/etc/sysconfig/lldpd
-ExecStartPre=/bin/mkdir @PRIVSEP_CHROOT@
+RuntimeDirectory=@PRIVSEP_CHROOT@
 ExecStart=@sbindir@/lldpd $DAEMON_ARGS $LLDPD_OPTIONS
 Restart=on-failure
 PrivateTmp=yes