diff options
author | Clemens Gruber <clemens.gruber@pqgruber.com> | 2015-12-06 17:54:22 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2015-12-09 20:36:59 +0100 |
commit | 3005fbcdc69dcf1960f93e3a33eccb037c55bd54 (patch) | |
tree | 4804a89ad3bb613aed798d1a0b5ac7761e244a00 | |
parent | 83cc3c0343cb342cedd1620abdf0021d7d1badc3 (diff) | |
download | ptxdist-3005fbcdc69dcf1960f93e3a33eccb037c55bd54.tar.gz ptxdist-3005fbcdc69dcf1960f93e3a33eccb037c55bd54.tar.xz |
lldpd: update to 0.7.19 and add systemd support
Bump version to current stable version 0.7.19.
Add options for custom TLV and JSON support.
Add systemd unit and adapt rule file accordingly.
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | projectroot/lib/systemd/system/lldpd.service | 13 | ||||
-rw-r--r-- | rules/lldpd.in | 18 | ||||
-rw-r--r-- | rules/lldpd.make | 26 |
3 files changed, 51 insertions, 6 deletions
diff --git a/projectroot/lib/systemd/system/lldpd.service b/projectroot/lib/systemd/system/lldpd.service new file mode 100644 index 000000000..9b511659a --- /dev/null +++ b/projectroot/lib/systemd/system/lldpd.service @@ -0,0 +1,13 @@ +[Unit] +Description=LLDP daemon +After=network.target +RequiresMountsFor=@PRIVSEP_CHROOT@ + +[Service] +Type=notify +NotifyAccess=main +ExecStart=/usr/sbin/lldpd @DAEMON_ARGS@ +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/rules/lldpd.in b/rules/lldpd.in index c4b443452..e7d3f519c 100644 --- a/rules/lldpd.in +++ b/rules/lldpd.in @@ -7,6 +7,7 @@ menuconfig LLDPD select LIBEVENT select NET_SNMP if LLDPD_SNMP select NET_SNMP_MIB_MODULES_AGENTX if LLDPD_SNMP + select JSON_C if LLDPD_JSON select LIBXML2 if LLDPD_XML select BUSYBOX_START_STOP_DAEMON if LLDPD_STARTSCRIPT select BUSYBOX_FEATURE_START_STOP_DAEMON_LONG_OPTIONS if LLDPD_STARTSCRIPT @@ -66,14 +67,23 @@ config LLDPD_DOT3 prompt "Enable Dot3 extension (PHY stuff)" default y +config LLDPD_CUSTOM_TLV + bool + prompt "Enable Custom TLV support" + default y + config LLDPD_OLDIES bool - prompt "Enable compatibility with Linux kernel older than 2.6.18" + prompt "Enable compatibility with Linux kernel older than 2.6.32" config LLDPD_SNMP bool prompt "Enable the use of SNMP" +config LLDPD_JSON + bool + prompt "Enable JSON output via json-c" + config LLDPD_XML bool prompt "Enable XML output via libxml2" @@ -83,6 +93,12 @@ config LLDPD_STARTSCRIPT prompt "install /etc/init.d/lldpd" default y +config LLDPD_SYSTEMD_UNIT + bool + prompt "install systemd service file" + default y + depends on SYSTEMD + config LLDPD_DAEMON_ARGS string prompt "additional arguments for daemon startup" diff --git a/rules/lldpd.make b/rules/lldpd.make index 37ba590b9..a798ca5c1 100644 --- a/rules/lldpd.make +++ b/rules/lldpd.make @@ -1,6 +1,7 @@ # -*-makefile-*- # # Copyright (C) 2013 by Alexander Dahl <post@lespocky.de> +# Copyright (C) 2015 by Clemens Gruber <clemens.gruber@pqgruber.com> # # See CREDITS for details about who has contributed to this project. # @@ -16,13 +17,13 @@ PACKAGES-$(PTXCONF_LLDPD) += lldpd # # Paths and names # -LLDPD_VERSION := 0.7.6 -LLDPD_MD5 := dbd90a68b91448dcb94a4a77c5d8ef65 -LLDPD := lldpd-$(LLDPD_VERSION) +LLDPD_VERSION := 0.7.19 +LLDPD_MD5 := 4e924420e00ccd5dc289506f43221820 +LLDPD := lldpd-$(LLDPD_VERSION) LLDPD_SUFFIX := tar.gz -LLDPD_URL := http://media.luffy.cx/files/lldpd//$(LLDPD).$(LLDPD_SUFFIX) +LLDPD_URL := http://media.luffy.cx/files/lldpd//$(LLDPD).$(LLDPD_SUFFIX) LLDPD_SOURCE := $(SRCDIR)/$(LLDPD).$(LLDPD_SUFFIX) -LLDPD_DIR := $(BUILDDIR)/$(LLDPD) +LLDPD_DIR := $(BUILDDIR)/$(LLDPD) LLDPD_LICENSE := ISC # ---------------------------------------------------------------------------- @@ -40,9 +41,12 @@ LLDPD_CONF_OPT := $(CROSS_AUTOCONF_USR) \ --$(call ptx/endis, PTXCONF_LLDPD_LLDPMED)-lldpmed \ --$(call ptx/endis, PTXCONF_LLDPD_DOT1)-dot1 \ --$(call ptx/endis, PTXCONF_LLDPD_DOT3)-dot3 \ + --$(call ptx/endis, PTXCONF_LLDPD_CUSTOM_TLV)-custom \ --$(call ptx/endis, PTXCONF_LLDPD_OLDIES)-oldies \ --$(call ptx/wwo, PTXCONF_LLDPD_SNMP)-snmp \ + --$(call ptx/wwo, PTXCONF_LLDPD_JSON)-json \ --$(call ptx/wwo, PTXCONF_LLDPD_XML)-xml \ + --with-systemdsystemunitdir=/lib/systemd/system \ --with-privsep-user="$(PTXCONF_LLDPD_PRIVSEP_USER)" \ --with-privsep-group="$(PTXCONF_LLDPD_PRIVSEP_GROUP)" \ --with-privsep-chroot="$(PTXCONF_LLDPD_PRIVSEP_CHROOT)" @@ -82,6 +86,18 @@ endif endif endif +ifdef PTXCONF_LLDPD_SYSTEMD_UNIT + @$(call install_alternative, lldpd, 0, 0, 0644, /lib/systemd/system/lldpd.service) + @$(call install_replace, lldpd, /lib/systemd/system/lldpd.service, \ + @DAEMON_ARGS@, $(PTXCONF_LLDPD_DAEMON_ARGS)) + @$(call install_replace, lldpd, /lib/systemd/system/lldpd.service, \ + @PRIVSEP_CHROOT@, $(PTXCONF_LLDPD_PRIVSEP_CHROOT)) + @$(call install_link, lldpd, \ + ../lldpd.service, \ + /lib/systemd/system/multi-user.target.wants/lldpd.service \ + ) +endif + @$(call install_finish, lldpd) @$(call touch) |