lldpd: remove unneeded quotes and variable quoting
[openwrt/staging/nbd.git] / package / network / services / lldpd / files / lldpd.init
index d4642238a3e278fb9fe11bc934b8b4ee20674887..3fc47bb3e37fed05feb9a6db54c4678cd6a2fe71 100644 (file)
@@ -75,7 +75,8 @@ get_config_restart_hash() {
 }
 
 get_config_cid_ifaces() {
-       local _ifacesCONFIG_LLDPD_WITH_FDP
+       local _ifaces
+       config_get _ifaces 'config' 'cid_interface'
 
        local _iface _ifnames=""
        for _iface in $_ifaces; do
@@ -144,12 +145,12 @@ write_lldpd_conf()
        [ -n "$lldp_description" ] && echo "configure system description" "\"$lldp_description\"" >> "$LLDPD_CONF"
        [ -n "$lldp_hostname" ] && echo "configure system hostname" "\"$lldp_hostname\"" >> "$LLDPD_CONF"
        [ -n "$lldp_mgmt_ip" ] && echo "configure system ip management pattern" "\"$lldp_mgmt_ip\"" >> "$LLDPD_CONF"
-       [ -n "$lldp_syscapabilities" ] && echo "configure system capabilities enabled" "\"$lldp_syscapabilities\"" >> "$LLDPD_CONF"
+       [ -n "$lldp_syscapabilities" ] && echo "configure system capabilities enabled $lldp_syscapabilities" >> "$LLDPD_CONF"
        if [ "$CONFIG_LLDPD_WITH_LLDPMED" == "y" ] && [ $lldpmed_fast_start -gt 0 ]; then
                if [ $lldpmed_fast_start_tx_interval -gt 0 ]; then
-                       echo "configure med fast-start tx-interval" "\"$lldpmed_fast_start_tx_interval\"" >> "$LLDPD_CONF"
+                       echo "configure med fast-start tx-interval $lldpmed_fast_start_tx_interval" >> "$LLDPD_CONF"
                else
-                       echo "configure med fast-start" "enable" >> "$LLDPD_CONF"
+                       echo "configure med fast-start enable" >> "$LLDPD_CONF"
                fi
        fi
        [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF"
@@ -261,7 +262,7 @@ start_service() {
 
        if [ "$CONFIG_LLDPD_WITH_FDP" == "y" ] && [ $enable_fdp -gt 0 ]; then
                if [ $force_fdp -gt 0 ]; then
-                       # FDP enbled and forced
+                       # FDP enabled and forced
                        procd_append_param command '-ff'
                else
                        # FDP enabled
@@ -281,10 +282,10 @@ start_service() {
 
        if [ "$CONFIG_LLDPD_WITH_EDP" == "y" ] && [ $enable_edp -gt 0 ]; then
                if [ $force_edp -gt 0 ]; then
-                       # EDP enbled and forced
+                       # EDP enabled and forced
                        procd_append_param command '-ee'
                else
-                       # EDP enbled
+                       # EDP enabled
                        procd_append_param command '-e'
                fi
        fi