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
CONFIG_LLDPD_WITH_CDP=y
CONFIG_LLDPD_WITH_FDP=y
CONFIG_LLDPD_WITH_LLDPMED=y
+CONFIG_LLDPD_WITH_SNMP=y
CONFIG_LLDPD_WITH_SONMP=y
USE_PROCD=1
config_load 'lldpd'
config_get v 'config' 'lldp_class'; append _string "$v" ","
- config_get v 'config' 'agentxsocket'; append _string "$v" ","
+ if [ "$CONFIG_LLDPD_WITH_SNMP" == "y" ]; then
+ config_get v 'config' 'agentxsocket'; append _string "$v" ","
+ fi
config_get v 'config' 'cid_interface'; append _string "$v" ","
config_get v 'config' 'filter'; append _string "$v" ","
config_get_bool v 'config' 'readonly_mode'; append _string "$v" ","
config_get_bool lldpmed_no_inventory 'config' 'lldpmed_no_inventory' 0
fi
config_get_bool readonly_mode 'config' 'readonly_mode' 0
- config_get agentxsocket 'config' 'agentxsocket'
+ if [ "$CONFIG_LLDPD_WITH_SNMP" == "y" ]; then
+ config_get agentxsocket 'config' 'agentxsocket'
+ fi
config_get filter 'config' 'filter' 15
mkdir -p ${LLDPD_RUN}
[ $lldp_no_version -gt 0 ] && procd_append_param commanpackage/network/services/lldpd/Makefile package/network/services/lldpd/files/lldpd.initd '-k'
[ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ] && [ $lldpmed_no_inventory -gt 0 ] && procd_append_param command '-i'
[ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class"
- [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket"
+ [ "$CONFIG_LLDPD_WITH_SNMP" == "y" ] && [ -n "$agentxsocket" ] && procd_append_param command -x -X "$agentxsocket"
[ -n "$filter" ] && procd_append_param command -H "$filter"
# ChassisID interfaces