lldpd: remove unneeded quotes and variable quoting
authorPaul Donald <newtwen@gmail.com>
Thu, 8 Feb 2024 20:42:11 +0000 (21:42 +0100)
committerRobert Marko <robimarko@gmail.com>
Tue, 17 Sep 2024 10:36:03 +0000 (12:36 +0200)
from commit c98ee4dbb3db0f064d990941cdd82e872da76946

agent-type takes 1 of 3 possible keywords which do not require quoting:

         configure lldp agent-type nearest-bridge | nearest-non-tpmr-bridge
         | nearest-customer-bridge

Tested on 22.03.5

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 24a4da527f7e70d9916439a78298de2f4e4af653)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/network/services/lldpd/files/lldpd.init

index 3fc47bb3e37fed05feb9a6db54c4678cd6a2fe71..243a32c9378fc85badd28fffe0646ccdcf373588 100644 (file)
@@ -153,7 +153,7 @@ write_lldpd_conf()
                        echo "configure med fast-start enable" >> "$LLDPD_CONF"
                fi
        fi
-       [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type" "\"$lldp_agenttype\"" >> "$LLDPD_CONF"
+       [ -n "$lldp_agenttype" ] && echo "configure lldp agent-type $lldp_agenttype" >> "$LLDPD_CONF"
        [ -n "$lldp_portidsubtype" ] && echo "configure lldp portidsubtype" "\"$lldp_portidsubtype\"" >> "$LLDPD_CONF"
        [ -n "$lldp_platform" ] && echo "configure system platform" "\"$lldp_platform\"" >> "$LLDPD_CONF"
        [ $lldp_tx_interval -gt 0 ] && echo "configure lldp tx-interval" "$lldp_tx_interval" >> "$LLDPD_CONF"