]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
systemd: also read /etc/sysconfig/lldpd
authorVincent Bernat <bernat@luffy.cx>
Tue, 22 Oct 2013 19:24:19 +0000 (21:24 +0200)
committerVincent Bernat <bernat@luffy.cx>
Tue, 22 Oct 2013 19:24:19 +0000 (21:24 +0200)
While systemd's author says that we should get rid of those
pseudo-configuration files, keeping compatibility with previous ways
to configure daemons seem a valid reason to keep them. `/etc/default`
is Debian specific. We also read the equivalent one for RedHat to
ensure that everything will also continue to work here.

 http://0pointer.de/blog/projects/on-etc-sysinit.html

src/daemon/lldpd.service.in

index a61d79fadec4a5c13477585b12ca553e51277c6b..630aa48725368d4fb5a1a48263f6518c3cf5dbdd 100644 (file)
@@ -8,7 +8,8 @@ RequiresMountsFor=@PRIVSEP_CHROOT@
 Type=notify
 NotifyAccess=main
 EnvironmentFile=-/etc/default/lldpd
-ExecStart=@prefix@/sbin/lldpd $DAEMON_ARGS
+EnvironmentFile=-/etc/sysconfig/lldpd
+ExecStart=@prefix@/sbin/lldpd $DAEMON_ARGS $LLDPD_OPTIONS
 ExecStartPre=/bin/mkdir -p @PRIVSEP_CHROOT@/etc
 ExecStartPre=/bin/cp /etc/localtime @PRIVSEP_CHROOT@/etc/localtime
 Restart=on-failure