Skip to content

Commit

Permalink
Merge pull request #126 from openwrtdiy/openwrt-23.05
Browse files Browse the repository at this point in the history
Synchronize official source code
  • Loading branch information
openwrtdiy authored Sep 20, 2024
2 parents 8f55fa8 + 4d7ad37 commit ed60cc9
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 46 deletions.
23 changes: 16 additions & 7 deletions package/network/services/lldpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=lldpd
PKG_VERSION:=1.0.17
PKG_RELEASE:=1
PKG_RELEASE:=5

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/lldpd/lldpd/releases/download/$(PKG_VERSION)/
Expand All @@ -31,7 +31,7 @@ define Package/lldpd
CATEGORY:=Network
SUBMENU:=Routing and Redirection
TITLE:=Link Layer Discovery Protocol daemon
URL:=https://vincentbernat.github.io/lldpd/
URL:=https://lldpd.github.io/
DEPENDS:=+libcap +libevent2 +USE_GLIBC:libbsd +LLDPD_WITH_JSON:libjson-c +LLDPD_WITH_SNMP:libnetsnmp
USERID:=lldp=121:lldp=129
MENU:=1
Expand Down Expand Up @@ -68,19 +68,28 @@ define Package/lldpd/install
$(INSTALL_BIN) ./files/lldpd.init $(1)/etc/init.d/lldpd
$(INSTALL_CONF) ./files/lldpd.config $(1)/etc/config/lldpd
ifneq ($(CONFIG_LLDPD_WITH_CDP),y)
sed -i -e '/cdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
sed -i -e 's/CONFIG_LLDPD_WITH_CDP=y/CONFIG_LLDPD_WITH_CDP=n/g' $(1)/etc/init.d/lldpd
sed -i -e '/cdp/d' $(1)/etc/config/lldpd
endif
ifneq ($(CONFIG_LLDPD_WITH_FDP),y)
sed -i -e '/fdp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
sed -i -e 's/CONFIG_LLDPD_WITH_FDP=y/CONFIG_LLDPD_WITH_FDP=n/g' $(1)/etc/init.d/lldpd
sed -i -e '/fdp/d' $(1)/etc/config/lldpd
endif
ifneq ($(CONFIG_LLDPD_WITH_EDP),y)
sed -i -e '/edp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
sed -i -e 's/CONFIG_LLDPD_WITH_EDP=y/CONFIG_LLDPD_WITH_EDP=n/g' $(1)/etc/init.d/lldpd
sed -i -e '/edp/d' $(1)/etc/config/lldpd
endif
ifneq ($(CONFIG_LLDPD_WITH_SONMP),y)
sed -i -e '/sonmp/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
sed -i -e 's/CONFIG_LLDPD_WITH_SONMP=y/CONFIG_LLDPD_WITH_SONMP=n/g' $(1)/etc/init.d/lldpd
sed -i -e '/sonmp/d' $(1)/etc/config/lldpd
endif
ifneq ($(CONFIG_LLDPD_WITH_SNMP),y)
sed -i -e '/agentxsocket/d' $(1)/etc/init.d/lldpd $(1)/etc/config/lldpd
sed -i -e 's/CONFIG_LLDPD_WITH_SNMP=y/CONFIG_LLDPD_WITH_SNMP=n/g' $(1)/etc/init.d/lldpd
sed -i -e '/agentxsocket/d' $(1)/etc/config/lldpd
endif
ifneq ($(CONFIG_LLDPD_WITH_LLDPMED),y)
sed -i -e 's/CONFIG_LLDPD_WITH_LLDPMED=y/CONFIG_LLDPD_WITH_LLDPMED=n/g' $(1)/etc/init.d/lldpd
sed -i -e '/agentxsocket/d' $(1)/etc/config/lldpd
endif
endef

Expand Down
4 changes: 3 additions & 1 deletion package/network/services/lldpd/files/lldpd.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ config lldpd config
option agentxsocket /var/run/agentx.sock

option lldp_class 4
option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4"
# lldp_policy only needed for lldp_class 2-3
# option lldp_policy 'application streaming-video unknown'
option lldp_location "address country EU"

# if empty, the distribution description is sent
#option lldp_description "OpenWrt System"
Expand Down
Loading

0 comments on commit ed60cc9

Please sign in to comment.