aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-08-18 11:44:10 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-08-18 11:46:59 +0200
commit5388c725177bc0168c0e67b12de75e1086a2dd09 (patch)
treedf6890b70831e9b851e6a3c9ceac6dc07926ce01 /target/linux/bcm53xx
parent18ab496c3231731afbb3390b905f7498fd3488f8 (diff)
downloadupstream-5388c725177bc0168c0e67b12de75e1086a2dd09.tar.gz
upstream-5388c725177bc0168c0e67b12de75e1086a2dd09.tar.bz2
upstream-5388c725177bc0168c0e67b12de75e1086a2dd09.zip
Revert "bcm53xx: remove useless echo in 02_network"
This reverts commit b1f6a5d9dffd8da30800e9e66ea772554bbba778. In this particular case, the echo command was _not_ useless, but converted the newlines back to spaces. Add a comment into the code to make that obvious for the next one looking at it like me. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/bcm53xx')
-rwxr-xr-xtarget/linux/bcm53xx/base-files/etc/board.d/02_network5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network
index 6774e5bf46..5752b7760d 100755
--- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
@@ -55,8 +55,9 @@ bcm53xx_setup_interfaces()
# vlan2ports=4 5u
# and early Netgear R8000 was using
# vlan1ports=3 2 1 0 5 7 8*
- vlan1ports="$(nvram get vlan1ports | tr " " "\n" | sort)"
- vlan2ports="$(nvram get vlan2ports | tr " " "\n" | sort)"
+ # (the enclosing echo is needed to convert newline back to space)
+ vlan1ports="$(echo $(nvram get vlan1ports | tr " " "\n" | sort))"
+ vlan2ports="$(echo $(nvram get vlan2ports | tr " " "\n" | sort))"
if echo "$vlan1ports" | egrep -q "^1 2 3 4 5" && \
echo "$vlan2ports" | egrep -q "^0 5"; then
ucidef_add_switch "switch0" \