Commit 41cb64f1 authored by Alessandro Rubini's avatar Alessandro Rubini

/etc/init.d/lldpd.sh: fix another bashism

This removes "printf -v <outputvar> <format> ..." which is only
available in bash.

These needless incompatible extensions to standard commands are a
source of endless headaches.

In this case, my previous "fix" to this file was incomplete, because
I didn't not the braindead "printf -v" command.

Also, this changes the shebang to call sh (which is already done by rcS,
only the interactive execution now uses sh instead of bash).
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 30ef1717
Pipeline #550 passed with stage
in 103 minutes and 57 seconds
#!/bin/bash
#!/bin/sh
#
# Controls lldpd.
#
......@@ -70,7 +70,7 @@ start() {
echo "configure system interface pattern '!eth*'" >> $LLDPD_CONFIG
fi
for i_port in $(seq 1 18); do # scan all the physical ports
printf -v i_port_zero "%02d" $i_port
i_port_zero=$(printf "%02d" $i_port)
vlan=$(eval "echo \$CONFIG_VLANS_PORT"$i_port_zero"_LLDP_TX_VID")
if [ ! -z "$vlan" ]; then
prio=$(eval "echo \$CONFIG_VLANS_PORT"$i_port_zero"_LLDP_TX_PRIO")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment