From d32b0847d1e640c3d6ad7902438cbbf2bc17ee00 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sun, 23 Feb 2020 15:27:02 +0800 Subject: [PATCH] lldpd: bump to 1.0.5 --- package/network/services/lldpd/Makefile | 6 +++--- .../network/services/lldpd/files/lldpd.config | 1 + .../network/services/lldpd/files/lldpd.init | 8 ++++---- .../lldpd/patches/001-disable_libcap.patch | 2 +- .../services/lldpd/patches/010-limits.patch | 19 ------------------- 5 files changed, 9 insertions(+), 27 deletions(-) mode change 100755 => 100644 package/network/services/lldpd/files/lldpd.init delete mode 100644 package/network/services/lldpd/patches/010-limits.patch diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index eb1fe6539d..48a3993492 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lldpd -PKG_VERSION:=1.0.3 -PKG_RELEASE:=2 +PKG_VERSION:=1.0.5 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://media.luffy.cx/files/lldpd -PKG_HASH:=39fced395168015416bfe78b95414facf066f841f349024433aa20ab54e4c360 +PKG_HASH:=2dd3b212f4dbabfcbb2794c0010b245f9f8e74b387984e757be6243a74c6cb99 PKG_MAINTAINER:=Stijn Tintel PKG_LICENSE:=ISC diff --git a/package/network/services/lldpd/files/lldpd.config b/package/network/services/lldpd/files/lldpd.config index 36b43c89da..e16643c1f7 100644 --- a/package/network/services/lldpd/files/lldpd.config +++ b/package/network/services/lldpd/files/lldpd.config @@ -11,6 +11,7 @@ config lldpd config # if empty, the distribution description is sent #option lldp_description "OpenWrt System" + #option lldp_hostname "Modified Hostname" # interfaces to listen on list interface "loopback" diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init old mode 100755 new mode 100644 index c3d9ba0506..9fb3a82559 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -28,6 +28,9 @@ write_lldpd_conf() config_load 'lldpd' config_get lldp_description 'config' 'lldp_description' "$(find_release_info)" + local lldp_hostname + config_get lldp_hostname 'config' 'lldp_hostname' "$(cat /proc/sys/kernel/hostname)" + local ifaces config_get ifaces 'config' 'interface' @@ -43,6 +46,7 @@ write_lldpd_conf() echo -n > "$LLDPD_CONF" [ -n "$ifnames" ] && echo "configure system interface pattern" "$ifnames" >> "$LLDPD_CONF" [ -n "$lldp_description" ] && echo "configure system description" "\"$lldp_description\"" >> "$LLDPD_CONF" + [ -n "$lldp_hostname" ] && echo "configure system hostname" "\"$lldp_hostname\"" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR @@ -92,10 +96,6 @@ start_service() { procd_close_instance } -service_running() { - pgrep -x /usr/sbin/lldpd &> /dev/null -} - reload_service() { running || return 1 $LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF diff --git a/package/network/services/lldpd/patches/001-disable_libcap.patch b/package/network/services/lldpd/patches/001-disable_libcap.patch index 9b03d84381..96cf00a653 100644 --- a/package/network/services/lldpd/patches/001-disable_libcap.patch +++ b/package/network/services/lldpd/patches/001-disable_libcap.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -244,7 +244,13 @@ PKG_CHECK_MODULES([check], [check >= 0.9 +@@ -246,7 +246,13 @@ PKG_CHECK_MODULES([check], [check >= 0.9 # Third-party libraries lldp_CHECK_LIBEVENT diff --git a/package/network/services/lldpd/patches/010-limits.patch b/package/network/services/lldpd/patches/010-limits.patch deleted file mode 100644 index 1672145384..0000000000 --- a/package/network/services/lldpd/patches/010-limits.patch +++ /dev/null @@ -1,19 +0,0 @@ -From b2eebb31fc21b5ce12ef8944b50088119f1b9427 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=B6ren=20Tempel?= -Date: Mon, 25 Mar 2019 18:43:03 +0100 -Subject: [PATCH] priv: include limits.h for PATH_MAX - ---- - src/daemon/priv.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/src/daemon/priv.c -+++ b/src/daemon/priv.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #include - #include - #include