sed -i -e '/edp/d' $(1)/etc/init.d/lldpd $(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
CONFIG_LLDPD_WITH_CDP=y
CONFIG_LLDPD_WITH_FDP=y
CONFIG_LLDPD_WITH_LLDPMED=y
+CONFIG_LLDPD_WITH_SONMP=y
USE_PROCD=1
LLDPDBIN=/usr/sbin/lldpd
config_get_bool v 'config' 'enable_fdp'; append _string "$v" ","
config_get_bool v 'config' 'force_fdp'; append _string "$v" ","
fi
- config_get_bool v 'config' 'enable_sonmp'; append _string "$v" ","
+ if [ "$CONFIG_LLDPD_WITH_SONMP" == "y" ]; then
+ config_get_bool v 'config' 'enable_sonmp'; append _string "$v" ","
+ config_get_bool v 'config' 'force_sonmp'; append _string "$v" ","
+ fi
_hash=`echo -n "${_string}" | md5sum | awk '{ print \$1 }'`
export -n "$var=$_hash"
local enable_fdp
local force_fdp
local enable_sonmp
+ local force_sonmp
local enable_edp
local lldp_class
local lldp_location
config_get_bool enable_fdp 'config' 'enable_fdp' 0
config_get_bool force_fdp 'config' 'force_fdp' 0
fi
- config_get_bool enable_sonmp 'config' 'enable_sonmp' 0
+ if [ "$CONFIG_LLDPD_WITH_SONMP" == "y" ]; then
+ config_get_bool enable_sonmp 'config' 'enable_sonmp' 0
+ config_get_bool force_sonmp 'config' 'force_sonmp' 0
+ fi
config_get_bool enable_edp 'config' 'enable_edp' 0
config_get lldp_class 'config' 'lldp_class'
config_get lldp_location 'config' 'lldp_location'
fi
fi
- [ $enable_sonmp -gt 0 ] && procd_append_param command '-s'
+ if [ "$CONFIG_LLDPD_WITH_SONMP" == "y" ] && [ $enable_sonmp -gt 0 ]; then
+ if [ $force_sonmp -gt 0 ]; then
+ # SONMP enabled and forced
+ procd_append_param command '-ss'
+ else
+ # SONMP enabled
+ procd_append_param command '-s'
+ fi
+ fi
+
[ $enable_edp -gt 0 ] && procd_append_param command '-e'
+
[ $readonly_mode -gt 0 ] && procd_append_param command '-r'
[ $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'