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
STOP=01
CONFIG_LLDPD_WITH_CDP=y
+CONFIG_LLDPD_WITH_FDP=y
CONFIG_LLDPD_WITH_LLDPMED=y
USE_PROCD=1
config_get_bool v 'config' 'force_cdpv2'; append _string "$v" ","
fi
config_get_bool v 'config' 'enable_edp'; append _string "$v" ","
- config_get_bool v 'config' 'enable_fdp'; append _string "$v" ","
+ if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ]; then
+ 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" ","
_hash=`echo -n "${_string}" | md5sum | awk '{ print \$1 }'`
}
get_config_cid_ifaces() {
- local _ifaces
- config_get _ifaces 'config' 'cid_interface'
+ local _ifacesCONFIG_LLDPD_WITH_FDP
local _iface _ifnames=""
for _iface in $_ifaces; do
local force_cdp
local force_cdpv2
local enable_fdp
+ local force_fdp
local enable_sonmp
local enable_edp
local lldp_class
config_get_bool force_cdp 'config' 'force_cdp' 0
config_get_bool force_cdpv2 'config' 'force_cdpv2' 0
fi
- config_get_bool enable_fdp 'config' 'enable_fdp' 0
+ if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ]; then
+ 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
config_get_bool enable_edp 'config' 'enable_edp' 0
config_get lldp_class 'config' 'lldp_class'
fi
fi
- [ $enable_fdp -gt 0 ] && procd_append_param command '-f'
+ if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ] && [ $enable_fdp -gt 0 ]; then
+ if [ $force_fdp -gt 0 ]; then
+ # FDP enbled and forced
+ procd_append_param command '-ff'
+ else
+ # FDP enabled
+ procd_append_param command '-f'
+ fi
+ fi
+
[ $enable_sonmp -gt 0 ] && procd_append_param command '-s'
[ $enable_edp -gt 0 ] && procd_append_param command '-e'
[ $readonly_mode -gt 0 ] && procd_append_param command '-r'
$LLDPCLI -u $LLDPSOCKET &> /dev/null <<-EOF
unconfigure med fast-start
EOF
+
fi
# Rewrite lldpd.conf
# If something changed it should be included by the lldpcli call