SUBMENU:=Routing and Redirection
TITLE:=Link Layer Discovery Protocol daemon
URL:=https://github.com/vincentbernat/lldpd/wiki
- DEPENDS:=+libevent2 +USE_GLIBC:libbsd +LLDPD_WITH_JSON:libjson-c
+ DEPENDS:=+libevent2 +USE_GLIBC:libbsd +LLDPD_WITH_JSON:libjson-c +LLDPD_WITH_SNMP:libnetsnmp
USERID:=lldp=121:lldp=129
MENU:=1
endef
ifneq ($(CONFIG_LLDPD_WITH_SONMP),y)
sed -i -e '/sonmp/d' $(1)/etc/init.d/lldpd $(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
+endif
endef
define Package/lldpd/conffiles
$(if $(CONFIG_LLDPD_WITH_DOT3),,--disable-dot3) \
$(if $(CONFIG_LLDPD_WITH_CUSTOM),,--disable-custom) \
$(if $(CONFIG_LLDPD_WITH_SONMP),,--disable-sonmp) \
- $(if $(CONFIG_LLDPD_WITH_JSON),--with-json=json-c,--with-json=no)
+ $(if $(CONFIG_LLDPD_WITH_JSON),--with-json=json-c,--with-json=no) \
+ $(if $(CONFIG_LLDPD_WITH_SNMP),--with-snmp,)
$(eval $(call BuildPackage,lldpd))
local lldp_class
local lldp_location
local readonly_mode
+ local agentxsocket
config_load 'lldpd'
config_get_bool enable_cdp 'config' 'enable_cdp' 0
config_get lldp_class 'config' 'lldp_class'
config_get lldp_location 'config' 'lldp_location'
config_get_bool readonly_mode 'config' 'readonly_mode' 0
+ config_get agentxsocket 'config' 'agentxsocket'
mkdir -p /var/run/lldp
chown lldp:lldp /var/run/lldp
[ $enable_edp -gt 0 ] && procd_append_param command '-e'
[ $readonly_mode -gt 0 ] && procd_append_param command '-r'
[ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class"
+ [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket"
# set auto respawn behavior
procd_set_param respawn