diff options
| author | Paul Donald | 2024-02-08 22:37:13 +0000 |
|---|---|---|
| committer | Robert Marko | 2024-09-17 10:36:03 +0000 |
| commit | 7542e7927b6ca472ae7c2f38e1e8705c17cccb9a (patch) | |
| tree | c7581332f580134fafdf844bb2a068b28a1045aa | |
| parent | b88694869247cb1eaa9aca11a3d4e0f5f4f5ee6b (diff) | |
| download | openwrt-7542e7927b6ca472ae7c2f38e1e8705c17cccb9a.tar.gz | |
lldpd: fix error "sh: XXXms: bad number"
from commit 3ce909914a12647bec52bcee0a162dd6d158a4f6
The lldpd man page says that "configure lldp tx-interval" can
specify an interval value in milliseconds by appending a "ms" suffix to
the figure. Thus mandating string handling, and not integer comparison.
Tested on 22.03.5
Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 79ee4cb0397eb9eae34369e33d66b5a1d837a652)
Link: https://github.com/openwrt/openwrt/pull/15299
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | package/network/services/lldpd/files/lldpd.init | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index e13128e2d6..97c572d347 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -148,7 +148,7 @@ write_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" + [ -n $lldp_tx_interval ] && echo "configure lldp tx-interval $lldp_tx_interval" >> "$LLDPD_CONF" [ $lldp_tx_hold -gt 0 ] && echo "configure lldp tx-hold $lldp_tx_hold" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR |